lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Problem searching field with % as value
Date Tue, 08 Dec 2009 16:20:01 GMT
Try printing out query.toString() to see what's actually being
sent to the searcher.

You can try the same thing in Luke, specifying StandardAnalyzer
to parse queries.

Are you sure you're specifying the fields in the query and not just the
'%'? That would go against your default field.

When you say that you can see the fields in luke, are you storing the field?
Because what you may be seeing is the *stored* value rather than the
*tokens*.
Make sure you're looking at the tokens in Luke..

If none of that helps, could you post a code snippet or two (index and
query)?

Best
Erick

On Tue, Dec 8, 2009 at 11:04 AM, kanayo <richies4all@gmail.com> wrote:

>
> Hi,
>
> I am a newbie to lucene. I am using Standard Analyzer in my lucene project.
> I am indexing some fields which may contain only "%" as a field value and
> it
> indexes fine and i can view the value against the field in the index using
> Luke.
>
> However when i try to retrieve the same field using indexsearcher and
> passing "%" as a query parameter nothing is retrieved. It is simply being
> ignored. I have also tried to escape the "%" while searching but still no
> results.
>
> Is there anything am not doing right?
>
> Thanks in advance for your assistance.
>
>
> --
> View this message in context:
> http://old.nabble.com/Problem-searching-field-with---as-value-tp26696184p26696184.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message