Document Ordering

2015-02-16 Thread Elliott Bradshaw
Hi, I'm interested in using Lucene to index binary objects with a specific document order, such that documents with the same key will be adjacent in the indexes. This would be done with the intent to maximize the use of the FS cache, since adjacent documents are more likely to be accessed

Fwd: Document Ordering

2015-02-16 Thread Elliott Bradshaw
Hi, I'm interested in using Lucene to index binary objects with a specific document order, such that documents with the same key will be adjacent in the indexes. This would be done with the intent to maximize the use of the disk block cache, since adjacent documents are more likely to be

Re: Document Ordering

2015-02-16 Thread Robert Muir
Have a look at SortingMergePolicy: http://lucene.apache.org/core/4_10_0/misc/org/apache/lucene/index/sorter/SortingMergePolicy.html On Mon, Feb 16, 2015 at 9:47 PM, Elliott Bradshaw ebradsh...@gmail.com wrote: Hi, I'm interested in using Lucene to index binary objects with a specific

Fwd: Document Ordering

2015-02-16 Thread Elliott Bradshaw
Hi, I'm interested in using Lucene to index binary objects with a specific document order, such that documents with the same key will be adjacent in the indexes. This would be done with the intent to maximize the use of the FS cache, since adjacent documents are more likely to be accessed

Re: How to achive this kind of document ordering

2010-05-20 Thread Dragan Jotanovic
Thanks Frank, the idea of preparing set of structured lists is what I initially thought I will have to do, but I'm afraid there will be serious performance penalty, because I would have to traverse the documents until I find all distinct values of SortFieldB. But I guess there is no other

Re: How to achive this kind of document ordering

2010-05-19 Thread Dragan Jotanovic
Thanks for trying to help, but that is not the answer I was looking for. The requirenment is a bit more specific. When sorting by second field, I don't want to sort it as A,A,A,B,B,C,C but A,B,C,A,B,C,A. I'm not sure even if this is possible using the Sort API. Maybe custom scoring or document

Re: How to achive this kind of document ordering

2010-05-19 Thread Frank Wesemann
Hi Dragan, First, all results are ordered by SortFieldA in ascending order. Than by SortFieldB so that all documents with the same SortFieldA value are ordered in levels structure. Each level consists of documents with distinct SortFieldB values. So, the requirenment is to show documents

How to achive this kind of document ordering

2010-05-18 Thread Dragan Jotanovic
|Hi, I need to sort results by two fields. First one is numeric and sorting should be in ascending order. Second one should be ordered in a levels structure. Here is the example: Unsorted: DocId SortFieldA SortFieldB 1101A 2102B 3102A

Re: How to achive this kind of document ordering

2010-05-18 Thread Erick Erickson
I just skimmed your message, but Lucene provides for multiple sorts. You can construct a Sort object from an arbitrary number of fields, and any documents that all sort equally for fields 1..k will be resolved by considering field k+1. The performance impact when searching is mostly upon the very