lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Query: A ? B
Date Thu, 04 Mar 2004 20:00:12 GMT
Use WildcardQuery: A?B

Otis

--- Jochen Frey <lucenelist@quontis.com> wrote:
> Hi Everyone.
> 
> I am trying to figure out how create a query that matches
> 
> A ? B
> 
> Where ? is exactly one token. Can anyone tell me how to do that?
> 
> 
> Obviously it's easy to match 'A * B' where '*' is 0 or 1 tokens (just
> use a
> PhraseQuery and set slop to 1). However, if I require exactly one
> word/token
> between 'A' and 'B'?
> 
> 
> BTW, I know a very clumsy way of doing this, but I really don't like
> it: For
> each indexed token insert a token (for example 'X') at the same
> token-position. Then the query would be: "A X B" and everybody
> (except the
> indexing performance as well as the size on disk) would be happy.
> 
> There's got to be an easier way. Right?
> 
> Thanks in advance!
> Jochen
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message