Quering with "google-style" operators

  • Hello everyone,

    A customer asked for a system change allowing a specific varchar field to be queryable using some kind of operators in a "google-style" fashion.

    He wants to be able to query for Gas AND Food OR Drink, and the result should contain Gas combined with Food or with Drink, or something like "Gas Station", that would bring a perfect match for Gas Station.

    Unfortunately, Full Text Search is not an option - for some weird reason, it's not allowed in our corporate servers. Neither dynamic sql.

    Has anyone achieved that or has some light to shed on this topic?

    Thanks in advance for any help.

  • ...

    Unfortunately, Full Text Search is not an option - for some weird reason, it's not allowed in our corporate servers. Neither dynamic sql.

    ...

    The closest to "google-style" search in SQL is Full-text search, if it's not an option, you can advise to change technology. For example document DB's (such as Mongo) can do it in much better way.

    I wonder, what will happen if the project sponsor (business) who pays for the technology will find out that their IT have "some weird reasons" for not using features of the product business paid a substantial amount of money for, instead coming up with really weird ideas of custom implementations (kind of bicycle inventions) which will cost a lot more and usually achieving much worse results.

    Is this sort of Government organisation?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Is this sort of Government organisation?

    :-D:-D:-D

    I'll not even lose time trying to find out how you knew it 😉

  • Then tell your customer he cannot have the "google-style" search as their IT prohibits it.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Teach the user how to use LIKE. It's easier.

    --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)

  • Are you able to use CLR?

  • also did you look at this long, detailed article here on SSC:

    A Google Like Full Text Search[/url]

    when the article came out, and i played with it, i learned a LOT.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I saw the article, is really cool, but i think our partner can't use FTS.

  • Hello everyone,

    Sorry for not replying before. After much talking, explanation, drawing... our client agreed with FTS, and the article helped solve the question.

    Thanks everyone for your valuable help!

  • What have you drawn to them? I can only guess...

    But I know for sure what I would draw... :hehe:

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Good morning everyone,

    Well... let's say this thread was really convincing... :w00t:

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

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