Hi Thomas,

How exactly are you executing the queries? If you're using shell commands,
keep in mind that the shell will apply its own escaping rules to your
command parameters first so if you're not careful a backslash might already
be "eaten" before the actual request is fired of. Same goes for any string
escaping rules in the programming language you might be implementing your
test script in.

I'm executing the queries from within Java by using solr-solrj-9.6.1.
This is an excerpt of the code in question that is being used:


var query = new SolrQuery(searchString)
    setParam("q.op", SearchMode.OR == request.getSearchMode() ? "OR" :
"AND")
    .setFields("id", "filename")
    .setSort("id", ORDER.asc)
    .setStart(request.getStart())
    .setRows(request.getRows());

final QueryResponse queryResponse;
try {
    getReadLock().lock();
    var solrClient = getSolrClient();
    queryResponse = solrClient.query(query, METHOD.POST);
} catch (SolrException ex) {
    throw new SolrServerException(ex);
} finally {
    getReadLock().unlock();
}


I have tested the above snippet with the query strings from my initial
post, i.e. quoted text, non-quoted text, hyphens escaped/non-escaped
etc., but the results didn't match what I was expecting...


Adding "wt=xml" to the query params above didn't change much...

Do you have idea what might causing this?


Regards

Thorsten

Reply via email to