lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Hall <mh...@informatics.jax.org>
Subject Re: lucene Front-end match
Date Fri, 19 Sep 2008 15:52:20 GMT
The reason the wildcard is being dropped is because you have wrapped it 
in a phrase query.  Wildcards are not supported in Pharse Queries.  At 
least not in any Analyzers that I'm aware of.

A really good tool to see the transformations that happen to a query is 
Luke, open it up against your index, go into the search section, choose 
the analyzer you use and start playing around.

This has helped me countless times when creating I'm my own queries and 
not getting the results that I expect.

-Matt

叶双明 wrote:
> I am sorry, just put the string to QueryParser.
> But what make me confusing the code:
>
> Query query = qp.parse("bbb:\"b*\" AND ccc:\"cc*\"");
>
> doesn't work as i have expected. It drop the Wildcard *.
>
>
> 2008/9/19, 叶双明 <yeshuangming@gmail.com>:
>   
>> Thanks!
>>
>> Now, I just use Query query = qp.parse("a*"); and  meet the my
>> requirements.
>>
>> Another question: how to parser query string like:           title:"The
>> Right Way" AND text:go
>> please show me in java code. thanks.
>>
>> 2008/9/19 Karl Wettin <karl.wettin@gmail.com>
>>
>>     
>>> 19 sep 2008 kl. 11.05 skrev 叶双明:
>>>
>>> Document<stored/uncompressed,indexed<field:abc>>
>>>       
>>>> Document<stored/uncompressed,indexed<field:bcd>>
>>>>
>>>> How can I get the first Document buy some query string like "a" , "ab" or
>>>> "abc" but no "b" and "bc"?
>>>>
>>>>         
>>> You would create an ngram filter that create grams from the first position
>>> only. Take a look at EdgeNGramTokenFilter in contrib/analyzers.
>>>
>>>
>>>     karl
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>>       
>> --
>> Sorry for my English!! 明
>> Please help me correct my English expression and error in syntax
>>
>>     
>
>
>
>   



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


Mime
View raw message