Re: Get matching fields from a BooleanQuery

2017-06-22 Thread Frederik Van Hoyweghen
ID; > IndexSearcher searcher; > int leafIndex = ReaderUtil.subIndex(docID, searcher.getIndexReader(). > leaves()); > LeafReaderContext leaf = searcher.getIndexReader(). > leaves().get(leafIndex); > int leafDocID = docID - leaf.docBase; > for (Query query : queries) { > Weigh

Get matching fields from a BooleanQuery

2017-06-19 Thread Frederik Van Hoyweghen
Hey everyone, To start, we are using Lucene 4.3. To search, we prepare several queries and combine these into a BooleanQuery. What we are looking for is a way to determine on which specific fields a certain document matched. For example, I create 2 queries: one to search in the "Name" field, and

Issues with locked indices

2017-06-06 Thread Frederik Van Hoyweghen
Hi, We are currently experiencing some issues where the lock on our index isn't being released properly (for some reason). Our indexing process ends with close() being called on all the writers that were used in the indexing process. We currently use the default NativeFSLockFactory

Re: Indexing a Date/DateTime/Time field in Lucene 4

2017-04-05 Thread Frederik Van Hoyweghen
work but LongField (or LongPoint on Lucene 6.0+) would > indeed provide better performance for range queries. If you need to sort or > aggregate date values, you might also want to add a NumericDocValuesField. > > Le mer. 5 avr. 2017 à 14:38, Frederik Van Hoyweghen < > fred

Indexing a Date/DateTime/Time field in Lucene 4

2017-04-05 Thread Frederik Van Hoyweghen
Hey everyone, I'm seeing some conflicting suggestions concerning the type of field to use for indexing a Date/DateTime/Time value. Some suggest conversion using DateTools.timeToString() and using a StringField, while others suggest using the long value of getTime() and using a LongField (this is

Re: “Too many open files" error hit when I run my Lucene 3.0.3 application on Java 8

2017-02-22 Thread Frederik Van Hoyweghen
Did you make any changes to your code between running on java 6 and 8? The java file API has changed considerably since java 8. If you -have- rewritten some of the file handling code in your indexing process, make sure to explicitly close the streams you create, or use the (since java 7) try-wi