Re: Searching in same position across multiple fields

2008-12-16 Thread Paul Cowan
Hi Hoss, Thanks for the reply. I've created a JIRA issue to track this -- https://issues.apache.org/jira/browse/LUCENE-1494 the initial thought was that just removing the term1.field=term2.field assertion would allow something liek this to work, but i don't think anyone every tried creating

Re: Searching in same position across multiple fields

2008-12-16 Thread Chris Hostetter
: 1) Use a modified SpanNearQuery. If we assume that country + phone will always : be one token, we can rely on the fact that the positions of 'au' and '5678' in : Fred's document will be different. : :SpanQuery q1 = new SpanTermQuery(new Term("addresscountry", "au")); :SpanQuery q2 = new

Searching in same position across multiple fields

2008-12-15 Thread Paul Cowan
Hi all, (All examples below are using Lucene 2.2; if things have changed in later versions please adjust accordingly, though a quick check of the classes involved shows no major changes in trunk) We have an interesting situation where we are effectively indexing two 'entities' in our system,