Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Topic author was deleted

    Jun 16, 2016 @ 09:15

    Examine, Lucene, escaping chars and wildchar issue

    Got a small issue I’m trying to solve here, got a search running with examine and trying to search for words that contain a - (so that needs to be escaped) if I combine that with a wildcard char I get no results, anyone who can explain that? So this works (returns results for the word fit-o-meter)

    contents:fit\-o\-meter

    but this doesn’t return any results

    contents:fit\-o\-mete*

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Jun 16, 2016 @ 10:00
    Ismail Mayat
    0

    Tim,

    Whats the generated query? So do a criteria.tostring

    Regards

    Ismial

  • Comment author was deleted

    Jun 16, 2016 @ 10:01

    Well contents:fit-o-mete* is part of my generated criteria, and I'm just using the dashboard examine control to execute a raw lucene query against the index...

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Jun 16, 2016 @ 10:08
    Ismail Mayat
    1

    Tim,

    Try the query in luke java version and then get a breakdown via explain button see what its doing.

    Regards

    Ismail

  • Comment author was deleted

    Jun 16, 2016 @ 10:09

    Ok thanks Ismail, will give that a go :)

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Jun 16, 2016 @ 10:13
    Ismail Mayat
    1

    Tim,

    Ignore that last comment. In luke find a document that acutally has that term then look at the contents field in luke what do you see?

    I think it may be something todo with analyser not tokenising due to the - so for first query its exact match but for second query its going to try partial match on tokens but those individual tokens do not exist.

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Jun 16, 2016 @ 10:22
  • Comment author was deleted

    Jun 16, 2016 @ 10:49

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft