Results 1 to 2 of 2
  1. #1
    romiko is offline Member
    Join Date
    Nov 2011
    Posts
    1
    Rep Power
    0

    Default Fuzzy Search Results = Most Relevant on Top

    Hi,

    If I do a fuzzy search for Smith, and I have an IndexKey 'FamilyName', with smith and smath, when I do this query
    FamilyName:Smith~

    The results are showing Smath at the top, why is this so, and how can I make it show the most relevant results on top?

    Here is a groovy query, which runs off Neo4j Db:
    query = new QueryContext( '+(FamilyName:smith~^8)' ).sort( new Sort([ SortField.FIELD_SCORE ] as SortField[] ) )

    results
    Smath
    Smith
    Smith

    Any tips is appreciated, I would imagine that Smath would have a LOWER field score than Smith?

  2. #2
    Jayshri is offline Member
    Join Date
    Nov 2011
    Posts
    7
    Rep Power
    0

    Default Re: Fuzzy Search Results = Most Relevant on Top

    Make sure you are sorting documents by relevance.
    I have used same query for fuzzy search and sorted the documents by relevance than its giving me correct results:
    smith
    smath

    Exact match will have more relevance.

Similar Threads

  1. Get a token list with search results
    By icewall in forum Lucene
    Replies: 3
    Last Post: 11-15-2011, 10:16 AM
  2. Design search results .jsp
    By maas in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 07-19-2010, 08:18 AM
  3. Replies: 2
    Last Post: 03-27-2010, 10:01 AM
  4. Unique Filter on search results
    By selva in forum Lucene
    Replies: 0
    Last Post: 02-17-2009, 08:32 AM
  5. Problem with displaying search results from an array
    By BHCluster in forum New To Java
    Replies: 4
    Last Post: 04-24-2008, 04:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •