Skip to content

Commit 0c1fa88

Browse files
add complete fulltext stop words and clarify populating state (neo4j#1116)
1 parent 11dface commit 0c1fa88

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

modules/ROOT/pages/indexes/search-performance-indexes/managing-indexes.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ In those cases, nothing needs to be specified and the `OPTIONS` map should be om
4040
[TIP]
4141
Creating an index requires link:{neo4j-docs-base-uri}/operations-manual/{page-version}/authentication-authorization/database-administration/#access-control-database-administration-index[the `CREATE INDEX` privilege].
4242

43-
A newly created index is not immediately available but is created in the background.
43+
[NOTE]
44+
An index cannot be used while its `state` is `POPULATING`, which occurs immediately after it is created.
45+
To check the `state` of an index -- whether it is `ONLINE` (usable) or `POPULATING` (still being built; the `populationPercent` column shows the progress of the index creation) -- run the following command: `SHOW INDEXES`.
4446

4547
[[create-range-index]]
4648
=== Create a range index

modules/ROOT/pages/indexes/semantic-indexes/full-text-indexes.adoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
= Full-text indexes
44

55
A full-text index is used to index nodes and relationships by `STRING` properties.
6-
Unlike xref:indexes/search-performance-indexes/managing-indexes.adoc#indexes-create-range-index[range] and xref:indexes/search-performance-indexes/managing-indexes.adoc#indexes-create-text-index[text] indexes, which can only perform limited `STRING` matching (exact, prefix, substring, or suffix matches), full-text indexes stores individual words in any given `STRING` property.
6+
Unlike xref:indexes/search-performance-indexes/managing-indexes.adoc#create-range-index[range] and xref:indexes/search-performance-indexes/managing-indexes.adoc#create-text-index[text] indexes, which can only perform limited `STRING` matching (exact, prefix, substring, or suffix matches), full-text indexes stores individual words in any given `STRING` property.
77
This means that full-text indexes can be used to match within the _content_ of a `STRING` property.
88
Full-text indexes also return a score of proximity between a given query string and the `STRING` values stored in the database, thus enabling them to semantically interpret data.
99

@@ -83,15 +83,15 @@ The default analyzer (`standard-no-stop-words`) analyzes both the indexed values
8383
Stop words are common words in a language that can be filtered out during
8484
information retrieval tasks since they are considered to be of little use when determining the meaning of a string. These words are typically short and frequently used across various contexts.
8585
86-
For example, the following stop words are included in Lucene’s english analyzer: "a", "an", "and", "are", "as", "at", "be", "but”, and so on.
86+
For example, the following stop words are included in Lucene’s `english` analyzer: "a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", and "with".
8787
8888
Removing stop words can help reduce the size of stored data and thereby improve the efficiency of data retrieval.
8989
====
9090

9191
In some cases, using different analyzers for the indexed values and query string is more appropriate.
92-
For example, if handling `STRING` values written in Swedish, it may be beneficial to select the _swedish_ analyzer, which knows how to tokenize Swedish words, and will avoid indexing Swedish stop words.
92+
For example, if handling `STRING` values written in Swedish, it may be beneficial to select the `swedish` analyzer, which knows how to tokenize Swedish words, and will avoid indexing Swedish stop words.
9393

94-
A complete list of all available analyzers is included in the result of the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/reference/procedures/#procedure_db_index_fulltext_listavailableanalyzers[`db.index.fulltext.listAvailableAnalyzers`] procedure.
94+
The link:{neo4j-docs-base-uri}/operations-manual/{page-version}/reference/procedures/#procedure_db_index_fulltext_listavailableanalyzers[`db.index.fulltext.listAvailableAnalyzers()`] procedure shows all available analyzers.
9595

9696
Neo4j also supports the use of custom analyzers.
9797
For more information, see the link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/full-text-analyzer-provider[Java Reference Manual -> Full-text index analyzer providers].
@@ -133,13 +133,12 @@ For more information on how to configure full-text indexes, refer to the link:{n
133133
[[query-full-text-indexes]]
134134
== Query full-text indexes
135135

136+
Unlike xref:indexes/search-performance-indexes/managing-indexes.adoc[search-performance indexes], full-text indexes are not automatically used by the xref:planning-and-tuning/execution-plans.adoc[Cypher query planner].
136137
To query a full-text index, use either the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/reference/procedures/#procedure_db_index_fulltext_querynodes[`db.index.fulltext.queryNodes`] or the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/reference/procedures/#procedure_db_index_fulltext_relationships[`db.index.fulltext.queryRelationships`] procedure.
137138

138139
[NOTE]
139-
====
140-
Unlike other xref:indexes/search-performance-indexes/managing-indexes.adoc[search-performance indexes], full-text indexes are not automatically used by the xref:planning-and-tuning/execution-plans.adoc[Cypher query planner].
141-
To access full-text indexes, they must be explicitly called with the above-mentioned procedures.
142-
====
140+
An index cannot be used while its `state` is `POPULATING`, which occurs immediately after it is created.
141+
To check the `state` of a full-text index -- whether it is `ONLINE` (usable) or `POPULATING` (still being built; the `populationPercent` column shows the progress of the index creation) -- run the following command: `SHOW FULLTEXT INDEXES`.
143142

144143
This query uses the `db.index.fulltext.queryNodes` to look for `nils` in the previously created full-text index `namesAndTeams`:
145144

modules/ROOT/pages/indexes/semantic-indexes/vector-indexes.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ Default value::: `100`
184184

185185
To query a node vector index, use the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/reference/procedures/#procedure_db_index_vector_queryNodes[`db.index.vector.queryNodes`] procedure.
186186

187+
[NOTE]
188+
An index cannot be used while its `state` is `POPULATING`, which occurs immediately after it is created.
189+
To check the `state` of a vector index -- whether it is `ONLINE` (usable) or `POPULATING` (still being built; the `populationPercent` column shows the progress of the index creation) -- run the following command: `SHOW VECTOR INDEXES`.
190+
187191
.Signature for `db.index.vector.queryNodes`
188192
[source,syntax]
189193
----

0 commit comments

Comments
 (0)