i see there is no mention of Lazy indexing mode in the Indexing modes section, is this no longer supported? I
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@pabbap Thank you for the detailed feedback. This is being assigned to the content author [ @markjbrown ] to evaluate and update as appropriate.
Any update about that?
It is supported but we are de-emphasizing it to move customers away from Lazy indexing as it causes a great deal of confusion for customers. Our recommendation is to use Consistent Indexing. If you need to relax indexing to support bulk loading, turn off indexing, then turn back on.
Thanks.
@markjbrown I am using the lazy indexing in my solution and it greatly reduced the collection throughput to our expected levels without any other issues as we bulk load the data and search later. Is there any specific confusion that you are implying using this mode?
Thinking about your recommendation here, do you mean i need to set the indexing to None? this might create additional overhead of re indexing. As mentioned in a note above in this document Configuring the indexing mode as a None has the side effect of dropping any existing indexes. You should use this option if your access patterns require ID or self-link only.
The confusion was from people querying the data and getting missing results before the index had caught up.
If it works for you now that is fine. We are not going to remove the functionality.
Thank you, that's a relief.
However, i feel there must be a mention of Lazy mode in this document also highlighting the confusion you mentioned.
Why to hide a supported feature?
@markjbrown Could you please look into this?
Lazy mode performs updates to the index at a much lower priority level when the engine is not doing any other work. Because of this query performance can be highly unpredictable. It can also result in higher cost queries because the query engine has to do more work because it can't answer the query from the index. For these reasons we recommend against customers using it.
I will be submitting a PR to explain this in our docs. Can close this issue.
thanks.
Referencing Mark's PR that updates the doc.
I will be submitting a PR to explain this in our docs. Can close this issue.
I was about to submit an issue, asking to elaborate on the Lazy mode. Gladly checked the closed issued. The lesson: PR comes first, then the issue closed 🙂
Agree with @pabbap on https://github.com/MicrosoftDocs/azure-docs/issues/23875#issuecomment-463110982 - don't hide. Rather educate by adding a note/explanation.
@markjbrown could you please re-open the issue until the document is updated?
I have submitted a PR for this doc update and is now merged. Should get pushed live on Monday 10am PDT.
Apologies for the delay.
thanks.
Thank you @markjbrown. The document is still not refreshed. Could you point to the PR, please? My search foo on https://github.com/MicrosoftDocs/azure-docs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc is failing me.
PR is on a private repo so cannot point you to it.
Update won't be live until Monday 10am when the next push is.
Thanks
Update is now live, https://docs.microsoft.com/en-us/azure/cosmos-db/index-policy
Thanks Sean for bugging me on this :)
No, no, thank you Mark.
I can only wish other teams would take doco as serious and responsibly as you do.
Most helpful comment
Update is now live, https://docs.microsoft.com/en-us/azure/cosmos-db/index-policy
Thanks Sean for bugging me on this :)