directional based search

  • sql 2008 r2 setup, full-text is enabled if required here.

    Would anybody be able to share some implementation steps for seaching whole phrases in any direction one column at a time?

    e.g.

    Product001 | small round bed | other fields ...

    Product002 | large square bed | other fields ...

    Product003 | small bed | other fields ...

    Product004 | large bed | other fields ...

    Product005 | blue bed small | other fields ...

    Product006 | small bed blue | other fields ...

    Product007 | blue bed small | other fields ...

    e.g. user enters --> small bed blue

    should search for all these terms in any direction so results should be: Product005,Product006,Product007. Even though other products have "small" and/or "bed" words, these rows should not be returned as the user is searching for a whole phrase but doesn't necessarily know which order/direction the text is stored in the field.

  • "It Depends". 😉

    Which rows would you want to come back if the user just asked for "Small Bed"? All but 2 and 4?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply