keyword search with the astrogrid java librairies
KevinBenson
kmb at mssl.ucl.ac.uk
Fri Sep 12 08:08:48 PDT 2008
Hi Alexandre need to log off for a couple of hours. But I put some
answers below.
cheers,
Kevin
Alexandre RICHARD wrote:
> Hi,
>
> Sorry to post on the registry mailing lists a question specific to the
> Astrogrid Java client libraries but I have two questions I am
> struggling to get answers for, and I figured someone on the registry
> list might just know these answers.
>
> One of the use-cases I have been exploring recently with the ontology
> of astronomical object types is a small webapp that uses the ontology
> structure could find resources in a registry from a keyword or
> expression (with hopefully interesting results!)
>
> Finding such resources includes querying a registry. Following a
> suggestion from Brice Gassmann who has used the
> astrogrid registry java libraries to query the registry, I have
> started to use them for my own queries.
>
> Among the good surprises for me, I have noticed that besides Xqueries
> and ADQL, there is in
> org.astrogrid.registry.client.query.QueryRegistry a function that can
> be used to do a
> keywordSearch, which is very interesting for me, but I have a few
> quick questions which I hope someone will be able to answer.
>
> - After looking at the old javadoc of the library, I have been able to
> understand how keywordSearch(String) and keywordSearch(String,
> boolean) are to be used but I must confess I have no idea what the
> more recent
>
Sorry I will see if I can generate a new javadoc for these, it can look
confusing just looking at the method names. And quite possibly just
remove some of the methods.
> keywordSearch(String, int, boolean) //keywords, from resource number,
> identifier only (orValues is false so all keywords must be found)
> keywordSearch(String, boolean, int, boolean) //keywords, orValues,
> from, identifiersOnly
> keywordSearch(String, int, int, boolean) //keywords, from, to,
> identifiersOnly
> keywordSearch(String, boolean, int, int, boolean) //All the above
> methods actually just call this one that has everything: Keywords,
> orValues, from, to, identifiersOnly
If your curious on the parameters identifiersOnly will only return you
xml with all the identifiers no other content (you can then call
getResource if needed). So normally this is set to false. From and To
lets you page through resources the server (on ADQL and KeywordSearches)
can return only a subset making the client page through the resources.
I think maybe Astrogrid default is 200. The server side decides what
elements to search on and at the moment it is just the basic text
elements 'title, description, subject' e-mail me directly and I can add
more fields. Typically the Astrogrid Registry has getResource() and
XQuery() searches 99% of the time so I have not given much thought of
other elements people might like on the keywordSearch. (in fact the
keywordSearch on the back end is just an XQuery)
>
> are to be used. Obviously the first String is the space-separated
> string of the keywords to search, but the other parameters I do not know.
>
>
> - Also, I was wondering how that keyword search was performed. Is it a
> plain
> text search in the subject or author or description fields? or is it
> something different?
>
>
> Alexandre Richard
More information about the registry
mailing list