Разделен индекс на основу (полную форму) и сокращение. Поправлено Readme с учетом новых реалий.
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
|
||||
WITH RECURSIVE PATH (cnt, aoid, aoguid, aolevel, fullname) AS (
|
||||
SELECT ao.id as cnt, ao.aoid, ao.aoguid, ao.aolevel,
|
||||
ao.shortname || ' ' || ao.formalname AS fullname
|
||||
ao.shortname || ' ' || ao.formalname AS fullname,
|
||||
ao.shortname || '' AS sname
|
||||
FROM "ADDROBJ" AS ao
|
||||
WHERE aolevel = 1 AND actstatus = TRUE AND livestatus = TRUE AND nextid IS NULL
|
||||
UNION
|
||||
SELECT child.id as cnt, child.aoid, child.aoguid, child.aolevel,
|
||||
PATH.fullname || ', ' || child.shortname || ' ' || child.formalname AS fullname
|
||||
PATH.fullname || ', ' || child.shortname || ' ' || child.formalname AS fullname,
|
||||
PATH.sname || ' ' || child.shortname AS sname
|
||||
FROM "ADDROBJ" AS child
|
||||
, PATH
|
||||
WHERE child.parentguid = PATH.aoguid AND actstatus = TRUE AND livestatus = TRUE AND nextid IS NULL
|
||||
)
|
||||
SELECT p.cnt, p.aoid, p.fullname, length(p.fullname)-length(replace(p.fullname, ' ', '')) as wordcount FROM PATH p WHERE p.AOLEVEL NOT IN (1, 3)
|
||||
SELECT p.cnt, p.aoid, p.fullname, p.sname, length(p.fullname)-length(replace(p.fullname, ' ', '')) as wordcount FROM PATH p WHERE p.AOLEVEL NOT IN (1, 3)
|
||||
@@ -10,9 +10,9 @@ source {{index_name}}
|
||||
sql_query = {{!sql_query}}
|
||||
|
||||
sql_field_string = fullname
|
||||
sql_field_string = sname
|
||||
sql_attr_uint = wordcount
|
||||
sql_attr_string = aoid
|
||||
sql_attr_string = aoguid
|
||||
}
|
||||
|
||||
index {{ index_name }}
|
||||
|
||||
@@ -33,11 +33,11 @@ searchd
|
||||
|
||||
# client read timeout, seconds
|
||||
# optional, default is 5
|
||||
read_timeout = 5
|
||||
read_timeout = 7
|
||||
|
||||
# maximum amount of children to fork (concurrent searches to run)
|
||||
# optional, default is 0 (unlimited)
|
||||
max_children = 30
|
||||
max_children = 4
|
||||
|
||||
# PID file, searchd process ID file name
|
||||
# mandatory
|
||||
@@ -59,5 +59,7 @@ searchd
|
||||
# whether to unlink .old index copies on succesful rotation.
|
||||
# optional, default is 1 (do unlink)
|
||||
unlink_old = 1
|
||||
|
||||
expansion_limit = 48
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user