lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david chris <orlondoda...@yahoo.fr>
Subject RE : Re: Lucene and queries
Date Sun, 21 Jan 2007 23:58:48 GMT
thank you for your posts ..

the "*" is any word .. hopefully, i should be able to identify sentences in a text and then
apply one of these 3 rules ..

(1) A  * * 
find the sentences that include the word A and to its left exactly two words (any words)
(2)  A * * B *
find the sentences that include the words A and B with between the word A and B exactly two
words (any words) and to  the left of word B exactly one word (any)
(3) * * A
find  the sentences that include the word A and to its right exactly two words (any words)

hope it is better

thanks
 

Chris Hostetter <hossman_lucene@fucit.org> a écrit : 
: There's no syntax I know of that'll give you this kind of query out of the
: box. The closest thing would be span queries, which will give you things
: like A**B, meaning "give me all documents where A is NOT MORE THAN 2 words
: away from B. This is not what you're asking for, since it would also return
: A*B and AB though...

there's also some ambiguity in wether or not the "*"s inthese examples can
be any term, or must not be the other terms you are dealing wiht (ie: does
"A A A" match #1 and #3? ... does "A A B B B" match #2.

: > (1) A * *
: > give me all documents with word A followed by exactly two words
: > (2) A * * B *
: > give me all documents with words A and B exactly separated by 2 words and
: > word B followed by one word
: > (3) * * A
: > give me all documents with word A prefixed by exactly two words


-Hoss


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



 		
---------------------------------
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez
des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message