Search Logic

  • Howdy Folks, I hope you all had a Very Merry Christmas and will continue to have a Very Happy New Year. :)

    Now I'm not certain this can be considered a "Technical Problem", it's probably more of a "Help File" problem. Or at least I think it is, so feel free to correct me if I'm wrong.

    To help explain the problem, I'll use term1, term2, term3, term4.... to represent individual words.

    The "Help File" indicates that a search using: term1 term2 would be treated as a search for: term1 OR term2

    I have found through extensive testing that: term1 term2 is treated as a search for: term1 AND term2

    To achieve an OR result I must search for: "term1" "term2" is treated as a search for: term1 OR term2 ****The double quotes are required****

    A quoted string "term1 term2 term3" is still treated as a quoted string.


    Some additional results I've found: term1 ("term2 term3 term4") == term1 AND "term2 term3 term4" *****Brackets () required whenever you want to use an AND with a double quote " " *****


    ____________________________: term1 -("term2 term3 term4") == term1 AND NOT "term2 term3 term4"


    ____________________________ : term1 term2 ("term3" "term4") == term1 AND term2 AND (term3 OR term4)


    ____________________________ : term1 term2 -("term3" "term4") == term1 AND term2 AND NOT(term3 OR term4)

    And so on, and so forth. Now, I did my testing on a small data set where the expected results could be easily predicted and the
    syntax I've indicated above worked consistently over hundreds of queries (searches). The use of the plus sign "+" seems to be
    irrelevant and I haven't really had the time to test out the rest of the "Help File" assertions, but since I have the "AND" "OR" and "NOT"
    figured out, I'm quite happy since you can accomplish quite a bit with just those three. If you get different results then what I've indicated
    Please let me know and I'll go back to assuming there is something wrong with my system. ^^

    Later, Rob


    • Offizieller Beitrag

    To clarify this, by default our search behaves like common search engines (e.g. Google) by concatenating all entered terms with an "AND". If a user types in two words they usually expect the results to contain both words; Furthermore it might appear that sometimes just one word was matched, but this is due to our search engine-like preview which tries to show as much details around the keyword. It may happen that the other search terms are included in the result, but not shown in the preview.

  • Yes I did, although I can't remember the terms I searched for. The "AND" query gave about 325 results and the "OR" query gave over 1000 using the same terms searching from the top level of the forum.
    I'll try again and let you know the terms I've used. Man this had better work. ;)

  • Well.... OK then. Alex just confirmed what I've been saying and this really isn't a technical problem, it's more of a misprint in the Help File.
    And I'll rest much easier knowing this. Now how do I go about correcting the Help File? 8|

    Later, Rob

    • Offizieller Beitrag

    The help message is not really wrong at all, it's just a big tricky.

    Zitat

    Text Text2 If you just write the words, every possibility will be listed, even if only one of those terms is found. Results containing both terms will be listed topmost.

    Well it says, that the search engine always tries to find elements which contain both terms, but additionally lists all results which contains at least one search term last.

  • I hate to disagree Alex, but "every possibility" has "OR" written all over it. :)
    At least it does to my way of thinking and every test I've tried gives me an "AND" result.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!