lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane James Vaucher <vauch...@cirano.qc.ca>
Subject Re: WildCardQuery
Date Mon, 04 Oct 2004 21:40:05 GMT
On Fri, 1 Oct 2004, Robinson Raju wrote:

> analyzer is StandardAnalyzer.
> i use MultiFieldQueryParser to parse.
>
> The flow is this:
> I have indexed a Database view. Now i need to search against a few columns
> i take in the search criteria and search field ,
> construct a wildcard query and add it to a boolean query
>
> WildcardQuery wQuery = new WildcardQuery(new Term(searchFields[0],
>                         searchString));

What is the value of searchString? Is it a word? QueryParser syntax is not
applied here.
Whats does ab* return?

> booleanQuery.add(wQuery, true, false);
> Query queryfilter = MultiFieldQueryParser.parse(filterString,
>                     filterFields, flags, analyzer);
> hits = parallelMultiSearcher.search(booleanQuery,queryFilter);
>
> when i dont use wild cards , it is taken as
> +((ITM_SHRT_DSC:natal ITM_SHRT_DSC:tylenol) (ITM_LONG_DSC:natal
> ITM_LONG_DSC:tylenol))
> But when wildcard is used , it is taken as
> 	+ITM_SHRT_DSC:nat* tylenol +ITM_LONG_DSC:nat* Tylenol

ITM_XXX fields are tokenized?

sv

> the first return around 300 records , the second , 0.
>
> any help would be appreciated
> Thanks
> Robin
>
> On Fri, 1 Oct 2004 02:06:04 -0400 (EDT), Stephane James Vaucher
> <vauchers@cirano.qc.ca> wrote:
> > Can you be a little more precise about how you process your documents?
> >
> > 1) What's your analyser? SimpleAnalyzer?
> > 2) How do you parse the query? Out-of-the-box QueryParser?
> >
> > > can we not enter space or do an OR search with two words one of which
> > > has a wildcard ?
> >
> > Simple answer, yes.
> >
> > Complicated answer, words are delimited by your tokeniser. That's included
> > in your analyser (hence my question above). The asterix syntax comes
> > from using a query parser that transforms the query into a PrefixQuery
> > object.
> >
> > sv
> >
> > On Fri, 1 Oct 2004, Robinson Raju w Hi ,
> >
> >
> > >    Would there be a problem if one enters space while using wildcards ?
> > > say i search for 'abc' . i get 100 hits as results
> > > 'man' gives - 200
> > > 'abc man' gives 300
> > > but
> > > 'ab* man'
> > > 'abc ma*'
> > > ab* ma*'
> > > ab* OR ma*
> > > ..
> > > all of these return 0 results.
> > > can we not enter space or do an OR search with two words one of which
> > > has a wildcard ?
> > >
> > > Regards,
> > > Robin
> > >
> > > ---------------------------------------------------------------------
> > > 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