Open scande3 opened 10 years ago
Related unit test that doesn't work:
it "should be retrieved via search" do
@authority.search("History--", "subjects")
@authority.results.first["label"].should == "History--Philosophy--History--20th century"
end
The problem seems to lie with LOC itself. This returns the same result http://id.loc.gov/search/?q=History--&q=
However, if you add a wildcard to the query it works: History--*
We could automatically append the wildcard to all searches.
We automatically appended the wildcard in the past but that seemed to cause other issues. See the discussion over the removal of the wildcard in pull request #49 . Possibly need some logic to only append it in certain cases? Or make it a setting of some sort?
Ah, thanks for pointing that out... completely forgot about it. I guess I'd lean towards an option to pass via the url or something, as it will vary per authority.
Hi, I saw in the documentation this uri : qa/search/getty/aat?q=amphora do you have the full URL to get this result : {"id":"http://vocab.getty.edu/aat/300198849","label":"Nolan amphorae"}, {"id":"http://vocab.getty.edu/aat/300200366","label":"Panathenaic amphorae"} I try with : http://vocab.getty.edu/qa/search/getty/aat?q=amphora or https://vocab.getty.edu/qa/search/getty/aat?q=amphora but, no result ! Can you help me please ? thank you
Setup / Expected
The documentation gives the following example:
QA then presents this data to you in JSON format:
Actual
The data actually returned is more like the following
The Issue
A "--" does not seem to be processed correctly. For example, searching for "History Philosophy" will return results more like the first example. As is, about half of the results currently do not contain the word "history" nor any "--". I have no yet done appropriate research into details of this behavior besides noticing it during recent testing.