Hi,

I just wanted to share with the list an issue that I have faced working with FeaturedSearch REST service within ContentHub. I have been developing a Java Client for ContentHub services and I think that FeaturedSearch RESTful API documentation should be clarified. Specifically, one of the request parameters is a Solr query String. According to the documentation, this parameter is " /the string format which is accepted by a Solr server. For example, q="john doe"&fl=score"

/The format of the example query is consistent with the String that you get with SolrQuery.getQuery method in Solrj library and it's also consistent with a Solr GET request URL query. The problem is that this string seems not to be consistent with SolrQuerySintax [1], so, it is not a valid String query for building a SolrQuery from the raw String with Solrj. Correct me if I'm wrong, but I think that FeaturedSearch implementation is directly building a SolrQuery from the solrQuery String parameter of the service.

I have done several tests with queries similar to the example query and I never get the correct results. I also try to build SolrQuery queries with Solrj programmatically and then pass SolrQuery.getQuery String as the parameter of the service without success. In fact, I haven't been able to find a way to convert a Solrj SolrQuery object to a well formed Solr String.

Using a raw String consistent with SolrQuerySintax and passing it as the solrQuery parameter is the only way I have find to get the correct results.

I think that this issue is not a bug, but the documentation leads you to think that you can use Solr URL like queries strings and, at least for me, that's not working.

[1] http://wiki.apache.org/solr/SolrQuerySyntax

Regards
/
/

--

------------------------------
This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately. Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.

Zaizi Ltd is registered in England and Wales with the registration number 6440931. The Registered Office is 222 Westbourne Studios, 242 Acklam Road, London W10 5JJ, UK.

Reply via email to