I’m working with the search aspect of the API and I was wondering how do you perform searches based on known attributes?
For example returning items have a “date_of_creation” attribute, my client doesn’t always know the company’s “company_number”, but they do know the date they were registered. Or another example is the client knows the address (which seems to live in the "snippet" attribute) but not the company_number or the registered name of the company.
In these cases is it possible, or will it be possible, to perform a search based on known information found in known attributes? If so how can this be achieved?
I imagine something like GET /search/companies?q=&date_of_creation=2015-05-14 or GET /search/companies?q=&snippet=AB1 2CD&search_type=contains
Hi Sam.
A lot of rationalisation is happening on the search API right now, bringing it in line with the other API’s and getting it ready to be able to search other data sets.
In the company case, most searching would generally just need to match against company name or company number. On top of this we plan to layer what we call “advanced search” features (so called because they fall outside the usual 80% or so of use cases and would therefore only be needed by advanced users). These features would allow filter on other indexed data, say off the top of my head, company status or incorporation date.
Before then we will be doing a customer needs capture exercise to determine what are the most common use cases.
Ok. I definitely want to be involved with the needs capture exercise. It will be most likely that our application will require “advanced search” capabilities.
I am looking at how Bristol City could learn from what is happening to Bristol Companies and so I know neither the name of the company nor its number. I could search for “Bristol” but there are lots of companies with the name Bristol that aren’t based in Bristol so as Sam says I’d like to be able to do a more refined search, say on postcode.
We are currently using Socrata’s open data platform which comes with very powerful API search tools - see http://dev.socrata.com/consumers/getting-started.html - so this is ideally they type of querying I’d like.
I hope these comments are helpful.
In the meantime I may look at companies that include Bristol and then manually filter by postcode.