1. I have corrected the e-mail settings so that outgoing e-mails from these forums should be sent now. If you tried to Register or Reset your Password, please try again!
    Dismiss Notice

Searching multiple parameters (OR search)

Discussion in 'Census: EverQuest II' started by Lera, Jan 30, 2013.

  1. Lera

    Lera Guest

    Is there a way to do an OR search, where records are returned if any of the parameters match?

     
  2. feldon30

    feldon30 Guest

    This is the default behavior. There's actually no way to do an AND.

     
  3. Dethdlr

    Dethdlr Guest

    Depends.  

    Take this query:

    census.daybreakgames.com/xml/count/eq2/i...playname=^Sword

    This returns the count of how many items start with "Sword" which is 38.

    Now take this query:

    census.daybreakgames.com/xml/count/eq2/item/?tierid=1

    This returns the count of how many items have a tierid=1 which is 13,775.

    Now let's combine the two:

    census.daybreakgames.com/xml/count/eq2/i...^Sword&tierid=1

    If this were an OR search, it would pull back the count of items that start with "Sword" OR had a tierid=1.  Instead, it only pulls back the 5 items that start with "Sword" AND have a tierid=1.  

    So in this case, it does an AND search.

    On the other hand, take this query:

    census.daybreakgames.com/xml/count/eq2/i...amagetype=Crush

    This pulls back the count of how many items there are with typeinfo.damagetype=Crush which is 8,978.

    Now take this query:

    census.daybreakgames.com/xml/count/eq2/i...amagetype=Slash

    This pulls back the count of how many items there are with typeinfo.damagetype=Slash which is 6,497.

    Now let's combine the two: 

    census.daybreakgames.com/xml/count/eq2/i...amagetype=Slash

    If this were an AND search, it would pull back 0 since it's impossible for an item to have two different values in the same field.  Instead, it pulls back 15,475 which is the count of items that have typeinfo.damagetype=Crush OR typeinfo.damagetype=Slash.

    So in some cases, it will do an AND search, and in other cases it will do an OR search.  Depends on the circumstances and what's being queried.

    Hope that helps,

    Dethdlr

     
  4. Dedith

    Dedith Guest

    Yeah, as Dethdlr mentioned, it'll OR same fields, but AND on different fields

     
  5. Dethdlr

    Dethdlr Guest

    Again, depends.  :)

    Take this query:

    census.daybreakgames.com/xml/count/eq2/i...playname=^Sword

    Returns 38 since 38 items have a displayname that starts with "Sword".

    Then this query: 

    census.daybreakgames.com/xml/count/eq2/i...layname=^Dagger

    Returns 74 since 74 items have a displayname that starts with "Dagger".

    Now combine them:

    census.daybreakgames.com/xml/count/eq2/i...playname=^Sword

    Returns 38 which is how many items have a display name that starts with "Sword".  <img src="/smilies/9d71f0541cff0a302a0309c5079e8dee.gif" border="0" alt="SMILEY" />

    Reverse the query to this: 

    census.daybreakgames.com/xml/count/eq2/i...layname=^Dagger

    And it returns 74 which is how many items have a diisplay name that starts with "Dagger".

    Depends on the circumstances and what's being queried.

     
  6. Dedith

    Dedith Guest

    lol, fun, it doesn't behave like OR with the non-equal operators..

     

Share This Page