Copied to clipboard

Flag this post as spam?

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


  • Rob Watkins 369 posts 701 karma points
    Jan 11, 2018 @ 15:12
    Rob Watkins
    0

    Examine returns no results for working Lucene query

    I am building an Examine search for schools, which in general is going well. However, I'm getting stuck on searching a field that is a CSV list of courses.

    What's really confusing is that if I do a ToString() on the criteria and run the raw Lucene query in the backoffice tools, I get the correct results!

    Query is this:

    +(+(nodeTypeAlias:highschool) +(apCourses:Art History)) +__IndexType:content

    Which works in the backoffice tools, but returns nothing from the Fluent search that actually generated it.

    The field being search is:

    apCourses: Art History,Calculus AB,Calculus BC,Chemistry,Environmental Science,European History,Latin,Physics C: Electricity and Magnetism,Physics C: Mechanics,US History

    (As a side note, "Art History" should be being escaped but isn't for some reason, although I haven't looked into that yet.)

  • Rob Watkins 369 posts 701 karma points
    Jan 11, 2018 @ 15:24
    Rob Watkins
    0

    Well, I've got the search working by not using Escape(), which doesn't actually seem to be doing anything, and putting my own quotes around strings; still doesn't explain why the original query returned no results from code but results when run in the tools however.

  • Greg 12 posts 102 karma points
    May 29, 2021 @ 17:22
    Greg
    0

    Did you ever figure this out?

Please Sign in or register to post replies

Write your reply to:

Draft