Skip to content

DOC-9450: Update SEARCH_META(..) instructions and examples #2468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 24, 2022

Conversation

abhinavdangeti
Copy link
Member

No description provided.

@simon-dew
Copy link
Contributor

I don't see how this PR fixes the broken links mentioned in DOC-9450?

@abhinavdangeti
Copy link
Member Author

@simon-dew One of the links was already fixed previously, as for the other - the page was deleted. So let me push up another patch set overwriting the earlier with the necessary examples.


[NOTE]
--
The examples in this page all assume that demonstration full text indexes have been created.
The examples in this page assume that you have a full text search index created with this definition, unless specified otherwise ..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The examples in this page assume that you have a full text search index created with this definition, unless specified otherwise ..
The examples in this page assume that you have a full text search index created with this definition, unless specified otherwise.

@@ -350,8 +392,74 @@ WHERE t1.type = "hotel" AND SEARCH(t1.description, "amazing");
----

If the full text search index being queried has its default mapping disabled and has a custom type mapping defined, the query needs to specify the type explicitly.

//The above query uses the demonstration index xref:fts:fts-demonstration-indexes.adoc#travel-sample-index-hotel-description[travel-sample-index-hotel-description], which has the custom type mapping "hotel".
The above query uses the following index definition ..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The above query uses the following index definition ..
The above query uses the following index definition:

For more information, refer to xref:fts:fts-quickstart-guide.adoc#preparing-for-full-text-searches[Preparing for Full Text Searches].

[NOTE]
--
The examples in this page all assume that demonstration full text indexes have been created, as described in xref:fts:fts-demonstration-indexes.adoc[Demonstration Indexes].
The examples in this page assume that you have a full text search index created with this definition, unless specified otherwise ..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The examples in this page assume that you have a full text search index created with this definition, unless specified otherwise ..
The examples in this page assume that you have a full text search index created with this definition, unless specified otherwise.

@@ -358,7 +400,74 @@ WHERE t1.type = "hotel" AND SEARCH(t1.description, "amazing");
----

If the full text search index being queried has its default mapping disabled and has a custom type mapping defined, the query needs to specify the type explicitly.
The above query uses the demonstration index xref:fts:fts-demonstration-indexes.adoc#travel-sample-index-hotel-description[travel-sample-index-hotel-description], which has the custom type mapping "hotel".
The above query uses the following index definition ..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The above query uses the following index definition ..
The above query uses the following index definition:

@Thejas-bhat
Copy link
Contributor

Perhaps, we can have consistent index definition examples wherever possible. This is in reference to index definitions on line 19 and 403 (in searchfun.adoc and similarly on lines 13 and 395 in fts-searching-from-N1QL.adoc) which differ in sourceType and the segmentVersion specified.

@abhinavdangeti
Copy link
Member Author

Perhaps, we can have consistent index definition examples wherever possible. This is in reference to index definitions on line 19 and 403 (in searchfun.adoc and similarly on lines 13 and 395 in fts-searching-from-N1QL.adoc) which differ in sourceType and the segmentVersion specified.

Ya good point, let me update the patchset.

Copy link
Contributor

@jon-strabala jon-strabala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note we previously had fts-demonstration-indexes.adoc which is still in 6.6 it becomes https://docs.couchbase.com/server/6.6/fts/fts-demonstration-indexes.html
the page has been removed in the recent updates.

Perhaps we should put it back as we reference this missing page from two additional documents outside this update which results in dead links

find . -name '*.adoc' -exec grep -l :fts-demonstration-indexes {} ;

  1. ./docs-server/modules/n1ql/pages/n1ql-language-reference/searchfun.adoc
  2. ./docs-server/modules/fts/pages/fts-searching-from-N1QL.adoc
  3. ./docs-server/modules/fts/pages/fts-quickstart-guide.adoc
  4. ./docs-server/modules/fts/pages/fts-supported-queries-geo-spatial.adoc

Items 1. and 2. are fixed in this PR
Item 3. Is a commented out reference - it should be deleted (it is a false positive via find)
Item 4. requires some minor work on fts-supported-queries-geo-spatial.adoc to remove "See Demonstration Indexes for the body" as the target no longer exists.

This will still leaves us with potential off site references to the missing page "fts-demonstration-indexes.adoc" but our docs will be consistent.

@abhinavdangeti
Copy link
Member Author

@jon-strabala Let me push up a patch here removing references to fts-demonstration-indexes.

As for adding the dropped page back ..

  • I don't believe there's any off site references to it.
  • If you think it's justifiable to add it back - we'll need to add to it index definitions that can be built against scope and collections first.
  • Also, since it's not part of this ticket - best deal with it separately.

Copy link
Contributor

@jon-strabala jon-strabala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abhinavdangeti abhinavdangeti merged commit 59f5d2e into couchbase:release/7.0 Feb 24, 2022
RayOffiah pushed a commit that referenced this pull request Feb 21, 2025
* DOC-9450: Update SEARCH_META(..) instructions and examples

* Remove references to fts-demonstration-indexes

* Fix reference to fts-supported-queries
RayOffiah pushed a commit that referenced this pull request Feb 21, 2025
* DOC-9450: Update SEARCH_META(..) instructions and examples

* Remove references to fts-demonstration-indexes

* Fix reference to fts-supported-queries

(cherry picked from commit 59f5d2e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants