Tag Archive for 'search'

JSON API Tweaked + example data

I’ve altered the SL Search API to always return the “url” field, and also replaced the “uuid” field for events (which returned incorrect data) with an “id” field that correctly marks the ID.

All current bugs in regards to returning blank or null fields have been fixed. In addition, I have added to the URLs for the search (actually it did this before, but I forgot to document it)

It can now accept the following format:

http://services.katharineberry.co.uk/search/search/(main|teen|mature)[/(all|classifieds|events|groups|people|places|wiki)]/search+term[/page-number]

The new parameter is in bold, and is entirely optional. It sets the category through which to search. Some example URLs:

http://services.katharineberry.co.uk/search/search/teen/test+search – A search for “test search” on the TG
http://services.katharineberry.co.uk/search/search/teen/groups/Group – A search for “Group” in all TG groups
http://services.katharineberry.co.uk/search/search/teen/places/Land/2 – Page 2 (results 11-20) of a search for “Land” in all TG places
http://services.katharineberry.co.uk/search/search/main/test+search – A search for “test search” on the MG
http://services.katharineberry.co.uk/search/search/mature/test+search – A search for “test search” on the MG, with mature results enabled.

Click here for examples of each type

Demotivating

I hate it when my text editor crashes. I really don’t have the motivation to waste my time redoing what I’ve already done. This is even more annoying if it truncates the file while saving, but crashes before writing the new one.

New search for AjaxLife will have to wait until I can be bothered to re-code it. Again.

The code now looks something like this:

AjaxLife.NewSearch = function() {

}();

*sigh*

JSON SL Search API

I’ve made a JSON-based interface to the new SL search, which provides access to all data available (I think).

All the methods have the base URL http://services.katharineberry.co.uk/search/.

Firstly, the search itself. This provides acccess to either MG or TG search, and provides information about all results on the page. It also supports specifying a page.

The format is as follows:

http://services.katharineberry.co.uk/search/search/(teen|main|mature)/search+string[/page-number]

The /page-number must be an integer, and is optional. If you use “teen” you get TG results, “main” gives MG results, and “mature” gives MG results with mature enabled. The output, assuming you know what JSON is, is fairly self-explanatory.

Additionally, you can access a bunch of other data:

http://services.katharineberry.co.uk/search/classified/required-uuid

http://services.katharineberry.co.uk/search/place/required-uuid

http://services.katharineberry.co.uk/search/resident/required-uuid

http://services.katharineberry.co.uk/search/region/required-uuid

http://services.katharineberry.co.uk/search/event/eventid

http://services.katharineberry.co.uk/search/group/required-uuid

Excluding events, all of the above expect a UUID in place of “required-uuid”. They can take both hyphenated and unhyphenated UUIDs. Events expect an Event ID, which are currently seven digit integers.

It can also pick out up to the top 100 popular places (I could do more – up to 50,000 – but capped it at 100 to save my server from certain death). The format for this is as follows:

http://services.katharineberry.co.uk/search/popular/(main|teen)/count

Using “main” gets MG data, “teen” gets TG data. “count” specifies the number of results to be returned.

Finally, as a bonus feature, if you have a key and have no idea what it’s for, put it in like this:

http://services.katharineberry.co.uk/search/unknown-uuid

This will make it search through the classifieds, parcels, residents, regions, events, groups, and textures. If it’s any of the above (except textures) it’ll return the same output as the standard services, with the added property “uuidtype” being set to one of the above. If it was a texture you only get the uuidtype. Please note that this takes several seconds to run, and is a relatively heavy job for my server.

I hope someone finds some use for this. Personally, I plan to use it in AjaxLife.

LL are spying. >.>

// Include region and x/y position, not for the GSA, but
// just to get logs on the web server for search_proxy.php
// showing where people were standing when they searched.

What possible use do LL have for this data? What would you do if you knew where people searched for what?

I can’t see any, myself.

Side note: GSA probably stands for Google Search Appliance.

AjaxLife search

I am aware that Linden Lab have released the new search officially. As such, I will be looking into what I can do about integrating it nicely onto AjaxLife over the weekend.

I suspect my solution will involve PHP, regular expressions, and JavaScript. Although I may make this part of the executable, in order to assist those who would be trying to run AjaxLife themselves (if any are).

Edited to fix myriad typos caused by my posting this from my phone while lying in bed.

New Search and WindLight

Well, on the one hand search and WindLight, yay!

On the other, it doesn’t like me. :(

SL Search

P.S. The AjaxLife server (as in the machine) is down. Working on it.

New SL Search

I found it at the obvious place on their site (after a couple of guesses), and it uses the same URL structure as Google after that, making searches easy.

Having poked around with it, I have noticed the following – based on the incomplete version that I found on their site:

  • It looks good
  • Classifieds are integrated neatly into the system
  • A good chunk of the data is hosted on Amazon S3 – profiles, events, places, top traffic sites, etc.
  • The TG and MG are in separate S3 buckets
  • It appears to use new secondlife:// features – specifically, secondlife://app/event/*/about, secondlife://app/classified/*, secondlife://app/agent/*/about. Visiting these with the RC client open made it crash. That said, clicking most buttons made it crash, so that’s not saying much.
  • Teen Grid and Main Grid results are not separated. I assume that this will change, given the separation of their data.
  • It searches wiki.secondlife.com.
  • A good deal of the data isn’t on S3 yet, so many links just tell you the key couldn’t be found.
  • Main Grid profiles default to visible, but Teen Grid profiles default to hidden.
  • Parcels have a list of searchable objects on them along with their prices, arranged in alphabetical order. Their parcel image is also visible.
  • Boolean operators such as “NOT” work as expected.
  • The search does not apply to the owner of something – e.g. a search for “Alex NOT Harbinger” still returns things owned by Alex Harbinger.
  • You can now grab limited resolution textures off the web at http://secondlife.com/app/image/texture-key/2 – this is used by the search to provide images.
  • The popular places lists, which appear in search (but probably shouldn’t), show sandboxes that are hidden from popular places in the current system.
  • Objects that aren’t for sale tend to appear in the object listings. Oops?
  • Avatar names tend to be just “(waiting)”, although the profiles they link to are accurate. I have yet to find any marked as “(hippos)”, however. :(

Also, lots of people seem to have expensive objects called “Object” for sale. It’d be nice if those were filtered out. The information seems to be fairly up-to-date, but is definitely slower at updating than the in-world stuff.

Of course, this is presumably supposed to be unreleased, so it could all change at whatever time. Still fun to look through though. And it actually looks like it’s a significant improvement over what we have now, woo.

Just need some way of separating out the MG and TG results. I suspect that LL will achieve this by locking searches to one of the two buckets depending on which grid you use.

See screenshots…