Versions Compared

Key

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

...

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> [<entity>|<indexId>] [<limit>]

test index

<> substitute, [] = optional, | alternate

<index#> is the value listed  in the "Index" column of the is command, and is used to indicate which index to perform the operation on

<indexId> is the value listed in the "Id" column of the is command, and is used to indicate which index to perform the operation on

"<search terms>" is a the text to search for, enclosed in double quotes if it contains spaces

id:<entityId> <entityKey> is the the text "text id:" followed by the id key value of a specific entity (not a type of entity), e.g. id:5412445142

<entity> <entityId> is the id (or type) of entity to search for, and is the value listed in the "Entity" column of the is command

Update: The ib, ik, id, ig, iu, io and ir commands now also accept a list of space separated index ids indexes or no index id parameters to perform the operation on all indexes.

Also, if multiple commands are submitted at once they'll be queued up so that only one command is performed at a time (this also goes for commands that are triggered through a schedule). This is to ensure that the server isn't overloaded with building indexes (you can imagine if you had 10 indexes and happened to type ib in the console and triggered the concurrent build of 10 indexes).

So at At the OSGi console you can use 'is' to see what indexes are currently registered in Weave

Code Block
none
none
linenumberstrue
osgi> is
Weave Index Service

Index	Id  Id           Entity          Count	Locked	   Locked  Modified
0	index      idx.roads    roads             N/A	   N/A	     N/A

...


1      idx.property property       796142   false   12/01/16 11:00 

From this we can see that the 'indexidx.roads' index has not actually been built, from here we can use the 'ib' command to build the index (assuming we haven't setup a schedule that would build the index for us)

Code Block
none
none
linenumberstrue
osgi> ib 0
Building index for 0
Processing index indexidx.roads
Indexing non-unique features from ROADS based on ROAD_ID
...
Total time to build index index.roads 32468ms

osgi> is
Weave Index Service

Index	Id  Id           Entity          Count	Locked	   Locked  Modified
0	index      idx.roads    roads           16131  166131	false	19/05/09 11:10

...

 false   14/02/16 10:56
1      idx.property property       796142   false   12/01/16 11:00

And then we can actually test our index without having to start the client

Code Block
none
none
linenumberstrue
osgi> it "cameo ct" 1
Raw Query: +(keywords_1:cameo^21.0 keywords_2:cameo^16.0 keywords_3:cameo^11.0 keywords_4:cameo^6.0 keywords_5:cameo) +(keywords_1:ct^21.0 keywords_2:ct^16.0 keywords_3:ct^11.0 keywords_4:ct^6.0 keywords_5:ct)2
Start search results for cameo ct
Start result 0
Score: 14.37126
Index: idx.roads
Entity: roads
Id: RD000800
Display 1: <B>Cameo</B> <B>Ct</B>
Display 2: BULLEEN
Keyword 1: CAMEO
Keyword 2: COURT CT CRT
Keyword 3: BULLEEN
Sort: 025 BULLEEN COURT CAMEO
Centroid: {"crs": "EPSG:28355", "x":331951.86744797, "y":5818594.860681824}
Envelope: {"crs": "EPSG:28355", "minx":331945.5843279641, "miny":5818544.714681777, "maxx":331958.1505679758, "maxy":5818645.006681871}
End result 0

Start result 1
Score: 21.21312
Index: idx.property
Entity: property
Id: 12395
Display 1: Mr R Dunhill
Display 2: 1 <B>CAMEO</B> CRT, BULLEEN
Keyword 1: 1 CAMEO CRT BULLEEN ERROR COURT CT
Keyword 2: Mr R Dunhill
Keyword 3: LOT 21 LP83371
Sort: 050 BULLEEN CRT CAMEO 000001
Centroid: {"crs": "EPSG:28355", "x":331921.4042969137, "y":5818564.7704825485}
Envelope: {"crs": "EPSG:28355", "minx":331903.6789254192, "miny":5818553.782011072, "maxx":331940.9090216262, "maxy":5818578.51987176}
End result 1

End search results
Code Block
osgi> it id:12395 idx.property
Start search results for cameo ctid:12395
Start result 0
Score: 14.31671721.21312
Index: idx.property
Entity: roadsproperty
Id: 4513212395
Display 1: Road: CAMEO CRT
Display 2: Suburb: BULLEEN
Keyword 1: CAMEO CRT COURT CT
Keyword 2: BULLEEN Mr R Dunhill
Display 2: 1 <B>CAMEO</B> CRT, BULLEEN
Keyword 1: 1 CAMEO CRT BULLEEN ERROR COURT CT
Keyword 2: Mr R Dunhill
Keyword 3: LOT 21 LP83371
Sort: 050 BULLEEN CRT CAMEO 000001
Centroid: {"crs": "EPSG:28355", "x":331921.4042969137, "y":5818564.7704825485}
Envelope: {"crs": "EPSG:28355", "minx":331903.6789254192, "miny":5818553.782011072, "maxx":331940.9090216262, "maxy":5818578.51987176}
End result 0
End search results

Manually updating indexes

...