I have added a new field to each document in my index containing
substrings of another field to speed up initial-wildcard searches.
Each document has a field "text" which might contain "the quick brown
fox jumped over the lazy dogs"
The new field - "text_substrings" would then contain "the quick u
I am using lucene 2.9 and I can't understand why a succession of
un-deprecated methods calls a deprecated method in this class.
The series of calls is as follows:
Searcher.search(Query, Collector)
IndexSearcher.search(Weight, Filter, Collector)
Scorer.score(Collector)
DocIdSetIterator.nextDoc()
Do
How easy is it to influence the score of search results in lucene 2.9?
The situation is that we have a large number of dated documents that
match the term "john" but we want to return the latest documents when
"john" is the search term.
My solution to this would be to override the score such that
I'm having trouble with the IndexReader class as per below: (using
lucene 2.9.1)
RAMDirectory dir = new RAMDirectory();
createIndex(dir);
IndexReader reader = IndexReader.open(dir);
IndexReader reader2 = reader.reopen();
reader.close();
reader2.terms(); // AlreadyClosedException - this IndexReader
I am having some issues with SpanNearQuery:
SpanQuery[] clauses = new SpanTermQuery[2];
Clauses[0] = new SpanTermQuery("text","");
Clauses[1] = new SpanTermQuery("text","");
SpanNearQuery q = new SpanNearQuery(clauses,0,true); // returns 1
document with " " in it
SpanQuery[] claus
r 1, 2011 at 11:30 AM, Gregory Tarr
wrote:
> I am having some issues with SpanNearQuery:
>
> SpanQuery[] clauses = new SpanTermQuery[2]; Clauses[0] = new
> SpanTermQuery("text",""); Clauses[1] = new
> SpanTermQuery("text",""); SpanNea
Sorry, I have got this working now. It was a silly mistake.
-Original Message-
From: Gregory Tarr [mailto:gregory.t...@detica.com]
Sent: 01 April 2011 12:13
To: java-user@lucene.apache.org
Subject: RE: SpanNearQuery with repeated term?
Sorry I am using 2.9.4, which is the same as 3.0.3
I attach a junit test which shows strange behaviour of the inOrder
parameter on the SpanNearQuery constructor, using Lucene 2.9.4.
My understanding of this parameter is that true forces the order and
false doesn't care about the order.
Using true always works. However using false works fine when
setting inOrder = false
q = new SpanNearQuery(clauses, 0, false);
searcher.search(q, collector);
// This assert fails - 3 docs are returned. Expecting only DOC2
Assert.assertEquals("Check 1 result", 1, collector.getTotalHits());
}
}
From: Gregory
Anyone able to help me with the problem below?
Thanks
Greg
-Original Message-
From: Gregory Tarr [mailto:gregory.t...@detica.com]
Sent: 09 May 2011 12:33
To: java-user@lucene.apache.org
Subject: RE: SpanNearQuery - inOrder parameter
Attachment didn't work - test below:
i
Chris, and others
Thanks for your reply. In effect what you are saying is that
SpanNearQuery works as expected, and I should set inOrder=true to obtain
the behaviour I require, even though I don't care about the order?
Thanks
Greg
-Original Message-
From: Chris Hostetter [mailto:hossma
Anyone else able to reply to this?
Thanks
Greg
-Original Message-
From: Gregory Tarr
Sent: 13 May 2011 15:46
To: 'java-user@lucene.apache.org'
Subject: RE: SpanNearQuery - inOrder parameter
Chris, and others
Thanks for your reply. In effect what you are saying is that
Spa
preventing you from specifying in-order?
Doron
On Tue, May 17, 2011 at 12:56 PM, Gregory Tarr
wrote:
> Anyone else able to reply to this?
>
> Thanks
>
> Greg
>
> -Original Message-
> From: Gregory Tarr
> Sent: 13 May 2011 15:46
> To: 'java-user@lucene.
13 matches
Mail list logo