non-standard query

2006-01-19 Thread Anton Potehin
I've the following problem: I've a big number of documents indexed. Suppose that the search query contains 20 terms. It is necessary to find all documents which contains at least 5 terms from search query. Is it possible to implement? If yes, what problems may arise during the solving of thi

Duplicates recods in index

2006-02-08 Thread Anton Potehin
Is it possible to add records into lucene index using following algorithm: 1) create Document object 2) add 5 fields into Document (id, name, field1, field2, field3). All fields are stored, indexed and tokenized 3) check if the document with current id and name was added before 4) if yes

Problem with TermDocs

2006-02-20 Thread Anton Potehin
Ir is IndexReader. termIdent is Term int freq = ir.docFreq(termIdent); if (freq > 1) { TermDocs termDocs = ir.termDocs(termIdent); int[] docsArr = new int[freq]; int[] freqArr = new int[freq]; int number = termDocs.read(docsArr,freqArr); System.out.println(number)

search problem

2006-02-28 Thread Anton Potehin
I have a problem. There is an index, which contains about 6,000,000 records (15,000,000 will be soon) the size is 4GB. Index is optimized and consists of only one segment. This index stores the products. Each product has brand, price and about 10 more additional fields. I want to not just find so

sub search

2006-03-07 Thread Anton Potehin
Is it possible to make search among results of previous search?   For example: I made search: Searcher searcher =... Query query = ... Hits hits = hits = Searcher.search(query);   After it I want to not make a new search, I want to make search among found results

Get only count

2006-03-07 Thread Anton Potehin
Now I create new search for get number of results. For example: IndexSearcher is = ... Query q = ... numberOfResults = Is.search(q).length(); Can I accelerate this example ? And how ?

RangeQuery and RangeFilter

2006-03-08 Thread Anton Potehin
What faster RangeQuery or RangeFilter ?

speed

2006-03-10 Thread Anton Potehin
I try 2 way for get count results: 1) Query q = IndexSearcher is = int count = Is.search(q).length(); 2) Query q = IndexSearcher is = CountCollector collector = new CountCollector(); Is.search(q, collector); Int count = collector.getCount(); First way return results for 1.644