Copied to clipboard

Flag this post as spam?

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


  • Connie DeCinko 931 posts 1160 karma points
    Jun 28, 2011 @ 22:54
    Connie DeCinko
    0

    Examine: Search Person Name - Best Practice

    I've got a basic Examine collection created, indexing a member's first name, middle name and last name.  I can get a basic search to function, say if I just search for their last name.

    What would be the best way to search when you don't know the exact criteria someone may use?  For example, they could enter just a last name, just a first name, a first and a last name, a first and middle and last name, or maybe they enter two names which turn out to be middle and last name.

    Should I create index columns of all the variations of a person's name?  Can I perform the search above with some fancy examine query?  What's the best practice?

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jun 30, 2011 @ 04:38
    Aaron Powell
    0

    If you don't use the fluent API and just pass the string into the search method it should search across all fields.

    Failing that there is nothing wrong with just using the Or operations to search across each fields.

    There's no real way you can define best practice for search, everyones index will be different and everyones needs will be different. You're best off at looking at your needs and how to achieve them with the API at hand.

Please Sign in or register to post replies

Write your reply to:

Draft