XML API - query attributes enable-multiple-hits="multi_hit_per_rule" versus secondary-query="author-title--multiple-hits"

We are developing a tool using XML API HTTP requests to query journal article metadata as part of our QA process, with the aim of reducing DOI conflicts when records are uploaded to CrossRef.

Could someone please help clarify the difference between the query/@enable-multiple-hits" and query/@secondary-query=“author-title–multiple-hits”, given the following test query?

<query enable-multiple-hits="multi_hit_per_rule" expanded-results="false" key="test" secondary-query="none">  
    <article_title match="exact">…</article_title>  
    <author match="fuzzy">…</author>  
    <issn match="optional">…</issn>  
    <journal_title match="exact">…</journal_title>
    <first_page match="optional">…</first_page> 

From the documentation, my understanding of the @secondary-query is that if the value is set to ‘author-title…’ this will run a metadata search based on metadata provided. So, with a value of ‘author-title-multiple-hits’, how does this differ from the ‘primary’ query/@enable-multiple-hits=“multi_hit_per_rule” when the above metadata are provided?

Thank you!

Hello, and thanks for your question.

secondary-query only comes into play, if you supply metadata beyond just the author and title (e.g. volume, issue, pages, year), and the initial query with all of that metadata fails.

With secondary-query=“author-title”, your request will be re-run only using the author and title metadata provided, but the results will only return a single hit (if a match was able to be made to that author/title metadata).

If you use secondary-query=“author-title-multiple-hits”, the secondary-query will again only come into play if the primary query (with the full metadata provided) fails to match anything, but this way, when the secondary query is run, multiple hits will be allowed.

This differs from enable-multiple-hits on the primary query, in that it’s only trying to match the author and title, not the rest of the metadata elements submitted.

Please let me know if you have any further questions.


Hi - thank you for the additional information -

The detail that I found unclear in the documentation on secondary-queries is in the first para under ‘Author/article title secondary query’:
“When other fields are present, the request is submitted as a metadata search.”

And then the section ‘Multiple hits secondary query’ ends with:
“This option can also be performed by setting attribute enable-multiple-hits (learn more about allowing multiple hits) to true.” (and reading thro the associated content…).

So, I had come to the conclusion that the query as it stands in my example above (with matching ‘exact’ only on journal and article titles) would cover all requirements we have and I gain nothing by adding the secondary-query=“multiple-hits | author-title-multiple-hits”.

I continue to run tests and, yes please, will be in touch if I need further clarification.

Just a note on findings re first_page
Testing in the Sandbox (tested matching as optional or exact, but not null, and then absent) appears to show that first_page is required and is not just recommended metadata (- referring to the required-recommended-elements documentation).

Thanks again