lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: what is wrong with query
Date Wed, 25 Aug 2004 11:16:33 GMT
That is correct... fuzzy searches are only on a per-term basis.

If what you meant, though, was a phrase query ("full" near "name") you  
have to add an explicit slop factor like "full name"~5

	Erik


On Aug 25, 2004, at 2:19 AM, Stephane James Vaucher wrote:

> From: http://jakarta.apache.org/lucene/docs/queryparsersyntax.html
>
> Fuzzy Searches
>
> Lucene supports fuzzy searches based on the Levenshtein Distance, or
> Edit Distance algorithm. To do a fuzzy search use the tilde, "~",  
> symbol
> at the end of a Single word Term.
>
> I haven't used fuzzy searches, but it seems to indicate that it can  
> only
> be used with single word terms. The query parser might have been  
> written
> to support that (the output indicates that as well).
>
> HTH,
> sv
>
> On Wed, 25 Aug 2004, Alex Kiselevski wrote:
>
>>
>> I use QueryParser
>> And I got an exception :
>> org.apache.lucene.queryParser.ParseException: Encountered "~" at line  
>> 1,
>> column 44.
>> Was expecting one of:
>>     <AND> ...
>>     <OR> ...
>>     <NOT> ...
>>     "+" ...
>>     "-" ...
>>     "(" ...
>>     ")" ...
>>     "^" ...
>>     <QUOTED> ...
>>     <TERM> ...
>>     <SLOP> ...
>>     <PREFIXTERM> ...
>>     <WILDTERM> ...
>>     "[" ...
>>     "{" ...
>>     <NUMBER> ...
>>
>>         at
>> org.apache.lucene.queryParser.QueryParser.generateParseException(Query 
>> Pa
>> rser.java:1045
>>         at
>> org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser 
>> .j
>> ava:925)
>>         at
>> org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:562)
>>         at
>> org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:500)
>>         at
>> org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:108)
>>         at
>> com.stp.corr.cv.search.CVSearcher.getMatchedResults(CVSearcher.java: 
>> 89)
>>         at com.stp.test.CVTest.main(CVTest.java:223)
>>
>> -----Original Message-----
>> From: Stephane James Vaucher [mailto:vauchers@cirano.qc.ca]
>> Sent: Wednesday, August 25, 2004 10:07 AM
>> To: Lucene Users List
>> Subject: Re: what is wrong with query
>>
>>
>> You'll have to give us more information than that...
>>
>> What is the problem you are seeing? I'll assume that you get no  
>> results.
>>
>> Tell us of the structure of your documents and how you index every
>> field.
>>
>> Concerning your syntax, if you are using the distributed query parser,
>> you don't need the + before name, nor the + before university as they
>> will be added by the parser.
>>
>> sv
>>
>> On Wed, 25 Aug 2004, Alex Kiselevski wrote:
>>
>>>
>>> Hi, pls,
>>> Tell me what is wrong with query:
>>> author:( +name AND "full name"~) AND book:( +university)
>>>
>>>
>>> Alex Kiselevsky
>>>  Speech Technology		Tel:	972-9-776-43-46
>>> R&D, Amdocs - Israel		Mobile:	972-53-63 50 38
>>> mailto:alexkis@amdocs.com
>>>
>>>
>>>
>>>
>>> The information contained in this message is proprietary of Amdocs,
>>> protected from disclosure, and may be privileged. The information is
>>> intended to be conveyed only to the designated recipient(s) of the
>>> message. If the reader of this message is not the intended recipient,
>>> you are hereby notified that any dissemination, use, distribution or
>>> copying of this communication is strictly prohibited and may be
>>> unlawful. If you have received this communication in error, please
>>> notify us immediately by replying to the message and deleting it from
>>> your computer. Thank you.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>>
>>
>> The information contained in this message is proprietary of Amdocs,
>> protected from disclosure, and may be privileged.
>> The information is intended to be conveyed only to the designated  
>> recipient(s)
>> of the message. If the reader of this message is not the intended  
>> recipient,
>> you are hereby notified that any dissemination, use, distribution or  
>> copying of
>> this communication is strictly prohibited and may be unlawful.
>> If you have received this communication in error, please notify us  
>> immediately
>> by replying to the message and deleting it from your computer.
>> Thank you.
>>
>> ---------------------------------------------------------------------
>> 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


---------------------------------------------------------------------
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