lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kumanan <kuma...@gmail.com>
Subject NumericRangeQuery performance with 1/2 billion documents in the index
Date Sat, 02 Jan 2010 19:02:35 GMT
Hi,

We have an index with 500 million documents in the index. Index size is 104
GB and 4 GB RAM for the search server.

When we try to do NumericRangeQuery on document_date field, it takes around
7-10 seconds. Is this expected for this size index?

Here is how I index that field.

            documentDateTimeField = new NumericField(DOCUMENT_DATE_TIME, 1,
Field.Store.NO, true);
            documentDateTimeField.setOmitNorms(true);
            documentDateTimeField.setOmitTermFreqAndPositions(true);

            if(scoreDetails.getDocumentDate() != null) {

 documentDateTimeField.setLongValue(scoreDetails.getDocumentDate().getTime());
            } else {
                documentDateTimeField.setIntValue(0);
            }
            doc.add(documentDateTimeField);

Here is how I construct the range query.

                    Long begin = esq.getBeginDate().getTime();
                    Long end = esq.getEndDate().getTime();

                    NumericRangeQuery rangeQuery =
NumericRangeQuery.newLongRange(WordSentenceDocumentFields.DOCUMENT_DATE_TIME,
                            1, begin, end,
                            esq.isBeginDateInclusive(),
esq.isEndDateInclusive());

                    BooleanQuery bq = new BooleanQuery();
                    bq.add(query, BooleanClause.Occur.MUST);
                    bq.add(rangeQuery, BooleanClause.Occur.MUST);

                    query = bq;

Am I doing something wrong?

Thanks
Kumanan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message