Versions Compared

Key

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

...

Code Block
xml
xml
linenumberstrue

<toolbar>
  <item component="weave.indexcombo"/>
</toolbar>

...

Code Block
xml
xml
linenumberstrue

<toolbar>
  <item component="weave.indexcombo" all="true"/>
</toolbar>

...

Name

Type

Description

width

string

Sets the width of the input box. This should be a standard HTML width setting, for example "100%" would fill the whole toolbar, "250px" would be 250 pixels wide.

minScale

number

When the user chooses an entity from the list the map will be zoomed to the extent of the chosen entity, this setting ensures that the map won't be zoomed in beyond the given scale.

pageSize

number

This value changes the number of items that will be presented to the user as the results of the search, for example "8" will tell the client to display the top 8 results for the search.

doSelect

boolean

The client can be instructed to not update the current selection when the user chooses a value from the list, this allows the index input box to be used as a simple find tool without actually interacting with the active selection.

clearOthers

boolean

If doSelect is set to true then when this flag is also set to true it tells the client that it should clear the selection for every other entity when the user chooses a particular entity, if set to false then the client won't clear the selection for the other entities.

doMarker

boolean

If set to true (the default) this flag tells the client to display a marker at the center of the chosen entity, if set to false then the client will not display a marker.

doGeometry

boolean

If set to false (the default) this flag tells the client not to display the geometry of the selected feature that the user chooses, if true then the client will display the geometry of the entity chosen. This is more useful if the drawing of selections is disabled in the ToC, otherwise the geometry will be drawn twice.

doMarkers

boolean

If set to true (the default) this flag tells the client to display a marker for each item in the list once it completes the search, but before the user chooses a particular entity. If set to false then no markers will be displayed (until the user chooses a particular entity if doMarker is set to true).

type

'wildcard', 'fuzzy' or 'exact'

Change the type of search that's performed, default is 'wildcard'. 'exact' performs the search using the search term, 'wildcard' appends an * to the end of the search term and 'fuzzy' appends a ~ to the end of the search term* to the end of the search term and 'fuzzy' appends a ~ to the end of the search term.

geometryFirstboolean

If true then geometry will be processed before the attributes. If false, the default, the attributes will be processed before the geometry.

This may change the way an index works depending upon the relationship between the geometry and the attributes. If there is a one-to-one relationship between the geometry records and the attribute records then this setting will make no difference.

If this value is true then there will be one index entry for each record in the geometry source, regardless of how may attribute records map to the geometry (since only the first attribute match will be used). If this value is false then there will be one index entry for each record in the attribute source and the geometry information may be duplicated.

For example setting this value to false means that entities with multiple names can be found if any of the names are searched for, but if this value was set to true then only one name associated with an entity would be searchable.

Beyond these settings it is also possible to change the stroke and fill of the geometry (if doGeometry is true) by adding a 'geometryStyle' tag to the configuration. The geometryStyle tag can set the fill and/or stroke used to draw the entity geometry when it is drawn on the client, but it will not change the style when drawing the selection.

Code Block
xml
xml
linenumberstrue

<toolbar>
  <item component="weave.indexcombo" all="true">
    <geometryStyle>
      <strokeOpacity>0.75</strokeOpacity>
      <strokeColor>#0000ff</strokeColor>
      <strokeWidth>2</strokeWidth>
      <fillOpacity>0</fillOpacity>
    </geometryStyle>
  </item>
</toolbar>

...

Code Block
xml
xml
linenumberstrue

<toolbar>
  <item component="weave.indexcombo" all="true">
    <geometryStyle>
      <strokeOpacity>0.75</strokeOpacity>
      <strokeColor>#0000ff</strokeColor>
      <strokeWidth>2</strokeWidth>
      <fillOpacity>0</fillOpacity>
    </geometryStyle>
    <tooltip>
      <title>Quick Search</title>
      <text>Type here to search</text>
    </tooltip>
    <tooltip2>
      <title>Quick Search</title>
      <text>Redisplay the last search results</text>
    </tooltip2>
  </item>
</toolbar>

...

Code Block
xml
xml
linenumberstrue

<!-- Create our roads entity -->
<entity:entity id="roads">
  <label>Roads</label>
</entity:entity>

<!-- Link the roads entity to the ROADS layer in our spatial engine (not shown) -->
<mapper:mapper id="roads.mapper">
  <spatialEngine>spatialEngine</spatialEngine>
  <mapping>
    <entity>roads</entity>
    <table>ROADS</table>
    <key>ROAD_ID</key>
  </mapping>
</mapper:mapper>

...

Code Block
xml
xml
linenumberstrue

<!-- Provide a road name, type and suburb based on ROAD_ID from the ROADS table -->
<data:datadefinition id="dd_index_roads">
  <datasourcedataconnection datasource="datasource" key="ROAD_ID">
    <prefix>DISTINCT</prefix>
    <from table="ROADS"/>
    <parameter name="name" column="NAME"/>
    <parameter name="type" column="TYPE"/>
    <parameter name="suburb" column="SUBURB"/>
  </datasourcedataconnection>
</data:datadefinition>

...

Code Block
xml
xml
linenumberstrue

<index:entity id="index.roads">
  <entity>roads</entity>
  <display>
    <datadefinition>dd_index_roads</datadefinition>
    <level1>Road: ${name} ${type}</level1>
    <level2>Suburb: ${suburb}</level2>
  </display>
  <keywords>
    <datadefinition>dd_index_roads</datadefinition>
    <level1>${name} ${type}</level1>
    <level2>${suburb}</level2>
  </keywords>
</index:entity>

...

Code Block
xml
xml
linenumberstrue

<index:entity id="index.roads">
  <entity>roads</entity>
  <display>
    <datadefinition>dd_index_roads</datadefinition>
    <level1>Road: ${name} ${type}</level1>
    <level2>Suburb: ${suburb}</level2>
  </display>
  <keywords>
    <datadefinition>dd_index_roads</datadefinition>
    <level1>${name} ${type}</level1>
    <level2>${suburb}</level2>
  </keywords>
  <sort>
    <datadefinition>dd_index_roads</datadefinition>
    <level1>${suburb} ${name}</level1>
  </sort>
</index:entity>

...

Code Block
xml
xml
linenumberstrue
     <level1>0020 ${suburb} ${name}</level1>

...

Code Block
xml
xml
linenumberstrue

<index:entity id="index.roads">
  <entity>roads</entity>
  <display>
    <datadefinition>dd_index_roads</datadefinition>
    <level1>Road: ${name} ${type}</level1>
    <level2>Suburb: ${suburb}</level2>
  </display>
  <keywords>
    <datadefinition>dd_index_roads</datadefinition>
    <level1>${name} ${type}</level1>
    <level2>${suburb}</level2>
  </keywords>
  <weights>
    <datadefinition>dd_index_roads</datadefinition>
    <value>${weight}</value>
  </weights>
  <sort>
    <datadefinition>dd_index_roads</datadefinition>
    <level1>${suburb} ${name}</level1>
  </sort>
</index:entity>

...

Code Block
none
none
linenumberstrue

ST,STR,STREET

And the seconds format has the original word followed by an equals sign and a space separated list of alternatives, for example:

Code Block
none
none
linenumberstrue

abandon=vacate
revoke=vacate
vacate=abandon revoke

...

Code Block
xml
xml
linenumberstrue

<index:entity id="index.roads">
  <entity>roads</entity>
  <display>
    <datadefinition>dd_index_roads</datadefinition>
    <level1>Road: ${name} ${type}</level1>
    <level2>Suburb: ${suburb}</level2>
  </display>
  <keywords>
    <datadefinition>dd_index_roads</datadefinition>
    <level1>${name} ${type}</level1>
    <level2>${suburb}</level2>
  </keywords>
  <synonyms>street.txt</synonyms>
</index:entity>

...

Code Block
none
none
linenumberstrue

osgi> is
Weave Index Service

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

...

Code Block
none
none
linenumberstrue

osgi> ib 0
Building index for 0
Processing index index.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             Entity         Count	Locked	Modified
0	index.roads    roads          166131	false	19/05/09 11:10

...

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)
Start search results for cameo ct
Start result 0
Score: 14.316717
Entity: roads
Id: 45132
Display 1: Road: CAMEO CRT
Display 2: Suburb: BULLEEN
Keyword 1: CAMEO CRT COURT CT
Keyword 2: BULLEEN
End result 0
End search results

...

To switch to the older method of generating indexes you can set

Code Block

<geometryFirst>true</geometryFirst>

...