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

Quick Question

Discussion in 'Census: General Discussion' started by fubea, Feb 12, 2012.

  1. fubea

    fubea Guest

    Hello,

    New to the EQ2 API but looking at some examples out there to return characters.I noticed that this works:

    [url="census.daybreakgames.com/json/get/eq2/character/?name.first=fubeast&c:limit=10">census.daybreakgames.com/json/get/eq2/ch...east&c:limit=10[/url]

    but when I try to use XML using this link:

    [url="census.daybreakgames.com/xml/get/eq2/character/?name.first=fubeast&c:limit=10">census.daybreakgames.com/xml/get/eq2/cha...east&c:limit=10[/url]

    I get nothing back. Is there a reason why I can't return a character using xml? Is there documentation that shows all of the differnet fields after name like name.first or name.last ?

     
  2. Lantis

    Lantis Guest

    Name is case-sensitive, try "Fubeast" instead.

     
  3. fubea

    fubea Guest

    Well i'll be dammed your right! thank you, is this documented anywhere?

     
  4. Lantis

    Lantis Guest

    Not sure if it's explicitely specified, but a recent addition to the API lets you access some important fields by their lower-case form.  Otherwise, you can use regexp to make your search non case-sensitive.

     
  5. DanKinney

    DanKinney Guest

    Correct...you can use any of these methods...

    Regular Expression Search (mentioned in this post and some more in the comments of this post):

    Case-insensitive search of the entire field: name.first=i/blah/

    Case-insensitive search from beginning: name.first=i/^blah/

    However, these will not make use of the indexes on the database, so they won't be super fast.  Suprisingly, they aren't that slow either since we have had the increase in memory.

    "Matching the data" Search

    Looking at the data, it appears that names are stored mixed-case, with the first character capitalized.  If you take your input and match this pattern, you will be able to use the following method and still make use of the index because it uses the "begins with" character (the "^"):

    name.first=^Blah

    If you accidently forget to capitalize the first letter, or if the data pattern changes, this search will begin to fail (not good).

    "tolower" Search

    Last week, we added a redundant field that stores (and indexes) a lower-case form of the field for searching (and sorting).  To use this, you would use...

    name.first_lower=^blah

    -dan

     

Share This Page