aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-28 03:45:57 +0000
committerbobzel <zzzman@gmail.com>2020-09-28 03:45:57 +0000
commit544577e1bc1611c8de1863d2a78458808ea05851 (patch)
tree0b7072fbc1412f0a536daa3c9816f16b44abe3d9 /src
parentbc4f646c74dadf1a95b993dc0b11beb9f5f9f044 (diff)
fixed syntax for SOLR
Diffstat (limited to 'src')
-rw-r--r--src/client/util/SearchUtil.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/util/SearchUtil.ts b/src/client/util/SearchUtil.ts
index b09eff849..84470f073 100644
--- a/src/client/util/SearchUtil.ts
+++ b/src/client/util/SearchUtil.ts
@@ -42,8 +42,9 @@ export namespace SearchUtil {
let replacedQuery = query.replace(/type_t:([^ )])/g, (substring, arg) => `{!join from=id to=proto_i}*:* AND ${arg}`);
if (options.onlyAliases) {
const header = query.match(/_[atnb]?:/) ? replacedQuery : "DEFAULT:" + replacedQuery;
- replacedQuery = `{!join from=id to=proto_i}${header}`;
+ replacedQuery = `({!join from=id to=proto_i}*) AND ${header}`;
}
+ console.log("Q: " + replacedQuery);
const gotten = await rp.get(rpquery, { qs: { ...options, q: replacedQuery } });
const result: IdSearchResult = gotten.startsWith("<") ? { ids: [], docs: [], numFound: 0, lines: [] } : JSON.parse(gotten);
if (!returnDocs) {