[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [search-ws] queryn: Some further comments
(Yes, of course, ampersand, I was just being careless.) This business about the queryn having a static value, say 3, even if the user only fills in one field - then what use does queryn have? Or is the idea that if the dumb client who sends a static value of three would always send in three clauses, but they might not all have terms, so only the ones with terms are valid clauses, and the rule is that a clause without a term is simply discarded. From: LeVan,Ralph [mailto:levan@oclc.org] No, the fields will not be comma separated; they’ll be ampersand separated. All the “successful” fields in the request will be sent as URL parameters to the server. The rest of the parameters can be added as hidden form fields. The queryN parameter will also (typically) be a hidden field with a static value. Remember, Ray, we’re talking about clients with no capability to compute anything. If they could compute, they could turn the form into a CQL query. My thinking is that if the form has places for three fields, qt1, qt2 and qt3, then queryN will have the value 3, even if the user only fills in one field in the form. No, I don’t think we can guarantee that good CQL clauses will go over the line in this model. It will be up to the query assembler on the server to make good CQL queries out of the random collection of q parameters it gets. Ralph From: Ray Denenberg, Library of Congress [mailto:rden@loc.gov] Ok, so short answer (Ralph) you agree that the queryn parameter is necessary (or at least sufficiently useful to include in the protocol). Moving on …. So normally the forms processor at the client is going to take all of the so-called "successful" fields, create 'field=value' pairs separated by commas, prepend a '?' and add it to the base url. In this case, all the rest of the SRU parmeters need to go on the url too. Will that work? Including the queryn parameter - the client will compute that value, it won't be part of the form, right? Another issue. For a given search clause, the cql rule is this: it must consist of either (a) index, relation, term; or (b) term. No other combination (e.g. relation, term) is valid. We want to enforce that, right? Will we be able to, given that we can't be sure that all the fields will "show up"? --Ray From: LeVan,Ralph [mailto:levan@oclc.org] Well, typically we do something like Tony showed in an earlier message. We write code than generates parameter names algorithmically and ask if that parameter name is present. The trick is to know when to stop asking. Usually, we stop when we no longer find a match. But that logic fails when there are omitted parameters (qi1 and qi3 but no qi2). When that happens, what we need to know is the value of the largest number potentially present (in my example, 3). With that, I’d ask for and get qi1; I’d ask for and not get qi2; I’d ask for and get qi3 and then I’d stop asking for parameters. Ralph From: Ray Denenberg, Library of Congress [mailto:rden@loc.gov] When the server runs out of parameters, it will know that there are no more q parameters, is that not sufficient, or what am I missing? From: LeVan,Ralph [mailto:levan@oclc.org] I think the rule for cql-java would be that they get processed in ascending name order. The name order will have nothing to do with the actual order of the parameters in the request (which cannot be predicted). The question becomes, when does the server stop looking for more parms? If there are two parms, q1 and q1000000, how does the server know to keep looking for q* names? That might be a good use of queryN; to indicate the highest number, either present or possible. (In the case of forms, you’d want to provide the biggest number in the form, which might not be either the number of fields in the form or the number of fields returned or even the number of a field that got returned.) Ralph From: Ray Denenberg, Library of Congress [mailto:rden@loc.gov] I have two areas to comment on: (1) queryn and the "operation" concept, and (2) parameter order. (1) queryn and the "operation" concept If we are going to incorporate this new feature into SRU, I would like to do it without serious disruption to our operations model. Introcuding a new operation would be a serious disruption. And I don't see that it is necessary to introduce a new operation anyway. Questions like (from Tony) "And then what happens if one has queryType=cql and no query parameter?" …. …. are very easily answered: 'it is an invalid request, the request fails with a diagnostic (something like) "incompatible combination of parameters" ' In fact I would go so far as to suggest that 'cql-form' could be added to the list of well-known query types. When queryType=cql-form: the query parameter MUST be omitted, and <these other> parameters included. So therefore I do not want to see the queryn parameter justified on the basis of the operation concept, and since the other reasons offerend for it are considered minor, I think I do not want it included at all. (2) parameter order. Isn't it necessary and sufficient to say that the parameter names must be strictly ascending? There has been suggestion that they should be (a) unique, or (b) consecutive. But I don't see that "unique" is sufficient, or that "consecutive" is necessary (nor that it is well-defined). But it seems to me that "strictly ascending" is necessary and sufficient. --Ray From: LeVan,Ralph [mailto:levan@oclc.org] The parameters will not be numbered consecutively if they come from a form. Forms do not transmit all their fields. Ralph From: Hammond, Tony [mailto:t.hammond@nature.com] No. All the fields are present numbered consecutively in CQL order - not necessarily form order. The query builder will merely drop clauses (and fields thereof) with empty terms. It is the field contents that contribute to the query. The fact that one field was passed over, another included, is not recorded in the final string which is just a complete CQL query string.
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]