lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshum <ansh...@gmail.com>
Subject Re: lucene 3.0.3 | phrase query problem
Date Thu, 10 Feb 2011 14:36:24 GMT
Hi Ranjit,
That would be because all stop words (space, comma, stop word set, etc..)
would be treated in a similar fashion and escaped while indexing, subject to
the analyzer you use while index your content.
Hope that explains the issue.

--
Anshum Gupta
http://ai-cafe.blogspot.com


On Thu, Feb 10, 2011 at 7:59 PM, Ranjit Kumar <Ranjit.Kumar@otssolutions.com
> wrote:

>  searchString = "i am using sql. server setting is easy task.";
>
>
>
> while i am searching for phrase query "Sql Server" in above string it gives
> result which is not correct. As In the above string sql and server is
> seperated by dot(.)
>
>
>
> using both PhraseQuery and SpanQuery gives same result.
>
>
>
>
>
> Hi,
>
>       Thanks for replay..
>
> I am creating index using syntax below:
>
>             doc.add(new Field("contents", new
> FileReader(f),Field.TermVector.WITH_POSITIONS_OFFSETS));
>
> As index need to stored in my system.
>
>
>
>       even if I am searching whole term (without case change even) using *PhraseQuery
*
>
> PhraseQuery pq_query = new PhraseQuery();
>
> pq_query.setSlop(1);
>
> pq_query.add( new Term( field, "sql" ) );
>
> pq_query.add( new Term( field, "server" ) );
>
> TopDocs topDocs = searcher.search(pq_query,20);
>
> System.out.println(Total hits :"+topDocs.totalHits);
>
>
>
> It gives incorrect result or document. In case of using SpanQuery and SpanNearQuery it
gives same result.
>
> *Is this a bug?*
>
> Can you give some hint about luke?
>
> Any suggestion will be appreciated.
>
>
>
>
>
>
>
> Thanks & Regards,
>
> *Ranjit Kumar                       ***
>
> Associate Software Engineer
>
>
>
> [image: cid:image002.jpg@01CB7089.C0069B40]
>
>
>
> *US:*       +1 408.540.0001
>
> *UK:*       +44 208.099.1660
>
> *India:*   +91 124.474.8100 | +91 124.410.1350
>
> *FAX:*     +1 408.516.9050
>
> http://www.otssolutions.com
>
>
> ===================================================================================================
> Private, Confidential and Privileged. This e-mail and any files and
> attachments transmitted with it are confidential and/or privileged. They are
> intended solely for the use of the intended recipient. The content of this
> e-mail and any file or attachment transmitted with it may have been changed
> or altered without the consent of the author. If you are not the intended
> recipient, please note that any review, dissemination, disclosure,
> alteration, printing, circulation or Transmission of this e-mail and/or any
> file or attachment transmitted with it, is prohibited and may be unlawful.
> If you have received this e-mail or any file or attachment transmitted with
> it in error please notify OTS Solutions at info@otssolutions.com===================================================================================================
>
>

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