Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If fact the range expansion is more complex than that and can handle a wide range of different formats, including some of the following examples:

Original

Additional

12A

12

1/12

12

1/12A

12A 12 1/12

1A/12A

1/12A 12A 12 1/12

1A/12

1/12 12

10-14

10 14 11 12 13

1/10-14

10-14 10 14 11 12 13 1/10 1/14 1/11 1/12 1/13

1A/10-14

1/10-14 10-14 10 14 11 12 13 1/10 1/14 1/11 1/12 1/13 1A/10 1A/14 1A/11 1A/12 1A/13

Number range expansion is automatic and does not require any changes to the index definition to be enabled, which also means that at the moment it can't be disabled, but that may change in the future.

Stop words

Lucene, the document search technology behind the Weave index search, uses a pre-defined list of “stop words”. Stop words typically include common words like "the," "and," "in," "is," and so on, which appear frequently in a language but don't carry significant meaning on their own. As of Weave 2.6.9 stop words are no longer used when building a index, this was done because stop words are generally useful when indexing large pieces of text, whereas Weave indexes are created on small pieces of text and the stop words should be included.

To restore the previous list of stop words, or set your own, you can create an new configuration item that lists the available stop words that should be used, e.g.

Code Block
languagexml
<?xml version="1.0" encoding="UTF-8"?>

<config xmlns="urn:com.cohga.server.config#1.0" xmlns:index="urn:com.cohga.server.index#1.0">
        <index:stopwords>
                <stopword>a</stopword>
                <stopword>an</stopword>
                <stopword>and</stopword>
                <stopword>are</stopword>
                <stopword>as</stopword>
                <stopword>at</stopword>
                <stopword>be</stopword>
                <stopword>but</stopword>
                <stopword>by</stopword>
                <stopword>for</stopword>
                <stopword>if</stopword>
                <stopword>in</stopword>
                <stopword>into</stopword>
                <stopword>is</stopword>
                <stopword>it</stopword>
                <stopword>no</stopword>
                <stopword>not</stopword>
                <stopword>of</stopword>
                <stopword>on</stopword>
                <stopword>or</stopword>
                <stopword>such</stopword>
                <stopword>that</stopword>
                <stopword>the</stopword>
                <stopword>their</stopword>
                <stopword>then</stopword>
                <stopword>there</stopword>
                <stopword>these</stopword>
                <stopword>they</stopword>
                <stopword>this</stopword>
                <stopword>to</stopword>
                <stopword>was</stopword>
                <stopword>will</stopword>
                <stopword>with</stopword>
        </index:stopwords>
</config>

Scheduling Updates

Because the index is built from the data that's available at the time it's built it may become stale over time and require rebuilding. This can be done manually at the OSGi console, (more on that later) or set up in the index definition using a schedule defined using a format similar to the Cron format.

By adding a schedule tag you can indicate to Weave when the index can be rebuilt down to the millisecond, and have it rebuilt at certain times each day or on certain days of the week (or a combination of these).

Unit

Range

milliseconds

0-999

seconds

0-59

minutes

0-59

hours

0-23

day of week

1-7 (sunday-saturday)

day of month

1-31

month

1-12


Schedule

Description

0 0 30 2

will run at 2:30am each day

0 0 30 2,14

will run at 2:30am and 2:30pm each day

0 0 30 2,8,14,20

will run at 2:30am, 8:30am, 2:30pm and 8:30pm each day

0 0 30 2 3

will run at 2:30am each Tuesday

0 0 30 2 * 1

will run at 2:30am on the first of each month (do not use*)

0 0 30 2 * 1 2

will run at 2:30am on the first of February each year (do not use*)

0 0 30 2 5 * 2

will run at 2:30am on each Thursday of February each year (do not use*)

0 0 30 2 4 1 2

will run at 2:30am on each Wednesday and on the first of February each year

0 0 15,45

will run every half hour at quarter past and quarter to

*It appears that using * for the day of the week or the day of the month may cause issues (like the index continually being built).

...

The indexing in Weave provides a number of commands that can be used at the OSGi prompt to work with the indexes.

Command

Parameters

Description

is


return a list of all indexes

ib

[<index#>|<indexId>]

rebuild an index or all indexes if no index is specified

ik

[<index#>|<indexId>]

update keyword fields for an index or all indexes if no index is specified

id

[<index#>|<indexId>]

update display fields for an index or all indexes if no index is specified

ig

[<index#>|<indexId>]

update geometry field for an index or all indexes if no index is specified

io

[<index#>|<indexId>]

update sort field for an index or all indexes if no index is specified

iu

[<index#>|<indexId>]

unlock an index or all indexes if no index is specified

ir

[<index#>|<indexId>]

remove an index or all indexes if no index is specified

it

"<search terms>"|id:<entityKey> [<entityId>|<indexId>] [<limit>]

test index

<> substitute, [] = optional, | alternate

...