lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Azize Martins <laz...@gmail.com>
Subject Re: QueryParser
Date Thu, 20 May 2010 17:29:00 GMT
I am indexing ".SQL" and looks by "extension:.SQL" (with dot), but result
from parser is: "extension:sql" (without dot).

Iam using "StandardAnalyzer".

Regards



2010/5/20 Josh Handel <Josh.Handel@catapultsystems.com>

> If you are indexing ".sql" and you look for "sql" then yes that is correct
> behavior (".sql" != "sql").. This goes doubly so because you included NOT
> ANALYZED so it will skip the analyzer (so it won't get tokenized or broken
> up in any way) and get indexed exactly as it is passed in when the doc is
> stored.
>
> The QueryParser will take your "extention:sql" and turn it into a term
> query on "extention" value "sql" you need to add a wild card to the front to
> include the "." in your query without knowing it's a dot.. BUT that's a
> horrible idea, and there are specific things you have to do to support
> wildcards at the front of an index...
>
> Checkout http://lucene.apache.org/java/2_9_2/queryparsersyntax.html  its
> worth keeping a bookmark of for stuff like this :-)
>
>
>
> Josh Handel
> Senior Consultant
> 512.328.8181 | Main
> 512.328.0584 | Fax
> 512.577-6568 | Cell
> www.catapultsystems.com
>
> CATAPULT SYSTEMS INC.
> ENABLING BUSINESS THROUGH TECHNOLOGY
>
>
>
> -----Original Message-----
> From: Leonardo Azize Martins [mailto:lazize@gmail.com]
> Sent: Thursday, May 20, 2010 11:58 AM
> To: lucene-net-user@lucene.apache.org
> Subject: QueryParser
>
> Hi,
>
> I have an index with this field:
>
> new
> Documents.Field("extension", file.Extension, Documents.Field.Store.NO<http://documents.field.store.no/>
> ,
> Documents.Field.Index.NOT_ANALYZED_NO_NORMS);
>
> So, field value is like .sql, .txt, .doc, .pdf, etc.
> When I find with query "extension:.sql", dot from ".sql" is removed and
> none
> is found, is it right?
>
> Regards
>

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