tigris
tigris copied to clipboard
refactor: Only index that are needed in indexing store
Describe your changes
We only index fields in the indexing store that are tagged in the model
How best to test these changes
Issue ticket number and link
Yes, this is tested with a collection with no search index and then updating the collection with a search index. This shouldn't crash or error anything. Note that we are not removing the fields from the search but rather just not indexing them when we don't need them. This is mainly optimizing indexing. Do you see any errors or crashes?
Yes, this is tested with a collection with no search index and then updating the collection with a search index. This shouldn't crash or error anything. Note that we are not removing the fields from the search but rather just not indexing them when we don't need them. This is mainly optimizing indexing. Do you see any errors or crashes?
You can try it out like this,
curl -H "content-type:application/json" '127.0.0.1:8081/v1/projects/p1/database/collections/test/createOrUpdate' -XPOST -d '{ "schema": { "title": "test", "properties": { "a": { "type": "string" }, "b": { "type": "string" } } } }
and then,
curl -H "content-type:application/json" '127.0.0.1:8081/v1/projects/p1/database/collections/test/createOrUpdate' -XPOST -d '{ "schema": { "title": "test", "properties": { "a": { "type": "string", "searchIndex": true }, "b": { "type": "string" } } } }
Looks good. It might be worth checking if we have an integration test with no search fields just to make sure this doesn't throw errors
Yes, many of the collection tests are not adding a search index.