Hitachi Content Platform​

 Search API JSON request documentation

  • Object Storage
  • Hitachi Content Intelligence HCI
  • Hitachi Data Ingestor HDI
Eduardo Javier Huerta Yero's profile image
Eduardo Javier Huerta Yero posted 07-17-2019 19:32

I would like to find documentation about the fields on the JSON request sent to the Search API. Although there is a model briefly explaining the meaning of each field, some questions are left unanswered. A few examples:

  • Why do we need a "queryString" AND "filterQueries" AND "returnedFieldFilter"? When is "queryString" not enough?
  • What are "customParameters"?
  • When should I use "modelVersion"? 
  • When should I use SQL queries? How does the schema looks like in this case? Which SQL functions are available?

I'm sure there are more questions like this that could be answered with a few examples and some high level explanations, I just can't find that in the docs.

Thanks


#HitachiContentIntelligenceHCI
#HitachiDataIngestorHDI
Jared Cohen's profile image
Jared Cohen

Eduardo,

You can find training info on each of these features in the knowledge transfer presentations from the releases we introduced them. All of the knowledge transfer training slides and presentations are available in the Employees area of the community. Filter queries were added in HCI 1.4. The other features mentioned were added in HCI 1.2 and 1.3 if you want to view the training on the features.

The query string is what you (a search end user) are searching for, what you type in the Google bar, etc.

Filter queries are additional clauses added to your search query, however the filter queries are treated slightly differently by the search engine. As one example, they are cached, and are typically used when the same filter is going to be applied many times to improve performance. For more information: https://lucene.apache.org/solr/guide/6_6/common-query-parameters.html

The returned field filter defines which fields you will see on the results of your search query. If you are searching a repository of books, for example, and only want to see the title and author of your search results, you could use this feature to filter out other metadata and simplify your results list.

Custom parameters allow you to include any Solr query parameter (you can find some examples in the above link). This feature was added to enable some of our more search-savy users to take advantage of features of Solr that we have not explicitly added first class support for in our UI.

Model Version is something to enable backwards compatibility in the future, in case we need to change the definitions of our API models at some point, and can be ignored.

When to use SQL queries is really up to you. If you or your customers are more comfortable with SQL than Solr Query Syntax, that is an option. Keep in mind that Solr's support of SQL doesn't expose quite all of the functionality that is exposed to the query syntax. Here is one place that describes the SQL interface of Solr, but there is plenty of information available on Solr's pages and elsewhere:  https://lucene.apache.org/solr/guide/6_6/parallel-sql-interface.html.

Hope this helps,

-Jared

Eduardo Javier Huerta Yero's profile image
Eduardo Javier Huerta Yero

Hi Jared,

Thanks for taking the time to put together this nice answer. It's really helpful.

Cheers,

Eduardo