HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

OR searches actually are AND searches?

AnonymooseAnonymoose ✭✭
edited November 2012 in Feedback

When searching for things like apples|oranges the results are messages with both apples and oranges. So this is really an AND operator rather than an OR operator?

Comments

  • ToddTodd Vanilla Staff

    Are you asking for an xor search?

  • mcu_hqmcu_hq ✭✭✭
    edited November 2012

    A post with apples AND oranges together would be matched high since they contain both words. You need to be sure to select "Extended" under "phrase match" to use these special operators.

    You can also try:

    operator NOT:

    apples -oranges

    apples !oranges

  • AnonymooseAnonymoose ✭✭
    edited November 2012

    Yes, I assumed it was something like XOR. But does an XOR search really make sense across forum messages. Not sure what to make of it.

  • @Anonymoose said:
    Yes, I assumed it was something like XOR. But does an XOR search really make sense across forum messages. Not sure what to make of it.

    what is your real question? I believe the | works the same as in google.
    I think you are getting at some semantic issue.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • AnonymooseAnonymoose ✭✭
    edited November 2012

    Yes, it bothered me a bit to have it called and OR search.

    I've never used that in Google. If it is standard like that, then just forget about this post.

  • But it is an OR search - in the same way as you code in php || OR. If either is true - than execute (or in this case display).

    if it was an & or AND in the same way as you code in php AND &&. Only if both are true - than execute (or in this case display).

    -I've come to understand your intentions though

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I guess this is a question of scope. If the operator is searching for a & b in a single message, or just searching across the whole range of data for a & b.

    In the context of a message board, it seems more useful for me to have a search which has a scope for operators of a single thread, so with a search for a & b, only threads containing a & b show up.

    Right now, it doesn't seem to work that way. When I search for a & b, I don't just get articles that have a & b. I get some articles with have only a and some which have only b, as well as those which have a & b.

  • mcu_hqmcu_hq ✭✭✭
    edited November 2012

    Edit: Try this:

    "apples oranges"/2 - This will look for messages with at least 2 of those words mentioned.


    "apples oranges" will look for messages that are adjacent to one another.

    "apples oranges"~20 will return messages that have those two words mentioned in less than 40 words between the two

    You can look here for more info on possible choices: http://sphinxsearch.com/docs/1.10/extended-syntax.html

    When I search for a & b, I don't just get articles that have a & b. I get some articles with have only a and some which have only b, as well as those which have a & b.

    If you think about it, you probably DO want messages that have one and perhaps not the other show up. The ones with both mentioned should have a higher ranking. I would like to know if this is not the case because then something is wrong.

Sign In or Register to comment.