Hi. Thanks for the great suggestion. This looks very useful, however I've tried to implement it and I'm not seeing any any difference. I've created the hook_pre_process.groovy
file (using the drop-down selector so not to mistype the filename), I've published the new file, and then I've added partial_query_enabled=true
and partial_query_expansion_index=3
to the collection.cfg file. I've even updated the collection just encase that was required.
Below is the parameters I'm using with the request:
/s/search.json?collection=uos-courses-xml&query=hist*&profile=defaultpreview
Notice the wildcard. I know that the first suggestion at least ought to be "history" which should populate the results array in the JSON but it's empty. I've tried setting even partial_query_expansion_index=1
to isolate that term, but still no joy.
Anything I might have missed? Any way to monitor that the hook script runs even (e.g. log files)?
Also, in that link you provided it states, "the expanded queries can be seen by viewing the JSON or XML output and looking at the query/queryAsProcessed/queryRaw/querySystemRaw/queryCleaned values from the response packet.", however, I'm only seeing the following:
"response": {
"resultPacket": {
"details": {
"padreVersion": "FUNNELBACK_PADRE_15.12.0.4 MDPLFS (Web/Ent) [64 bit]",
"collectionSize": ...,
"collectionUpdated": 1547115063000
},
"query": "hist",
"queryAsProcessed": "hist",
"queryRaw": "hist*",
"querySystemRaw": null,
"queryCleaned": "hist",
"collection": "uos-courses-xml",
"resultsSummary": {
"fullyMatching": 0,
"collapsed": 0,
"partiallyMatching": 0,
"totalMatching": 0,
"estimatedCounts": false,
"carriedOverFtd": null,
"totalDistinctMatchingUrls": null,
"numRanks": 10,
"currStart": 0,
"currEnd": 0,
"prevStart": null,
"nextStart": null,
"totalSecurityObscuredUrls": null,
"anyUrlsPromoted": false,
"resultDiversificationApplied": false
},
"spell": {
"url": "query=list&collection=uos-courses-xml&profile=_default_preview",
"text": "list"
},
"bestBets": [],
"results": [],
...