Skip to content
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

Adding/deleting an edge doesn't update the index of the object #18

Open
fredpook opened this issue Jun 7, 2017 · 7 comments
Open

Adding/deleting an edge doesn't update the index of the object #18

fredpook opened this issue Jun 7, 2017 · 7 comments

Comments

@fredpook
Copy link

fredpook commented Jun 7, 2017

Use case:
A query with: hasobject=1234
shows all rsc's with keyword 1234
When adding a new rsc with keyword 1234 it won't show in the query until a complete re-index.

@ddeboer
Copy link
Member

ddeboer commented Jun 7, 2017

I thought this too for a moment, but actually it works perfectly fine: zotonic/zotonic#1698.

Where/when do you see this behaviour?

@fredpook
Copy link
Author

fredpook commented Jun 8, 2017

Editors of Amsterdam Museum seen it happen several times.
Just now I solved 1 issue for them by calling the refresh API explicitly
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html

I didn't find code for refreshing in this module. Should we refresh after each operation?

@ddeboer
Copy link
Member

ddeboer commented Jun 8, 2017

No, we don’t need to. There can be a normal delay of ~1 sec between updating some document in Elasticsearch and its being available in the index.

That delay is normal behaviour, usually not an issue for our use-cases. The problem that some customers are seeing must be caused by some different cause. We should investigate why the normal behaviour doesn’t work here. Perhaps the Elasticsearch server is having performance issues, causing the PUTs to time out? We need to replicate the problem first to know for sure.

@fredpook
Copy link
Author

fredpook commented Jun 8, 2017

"some different cause" in this module since they didn't experience the issues before ...

@ddeboer
Copy link
Member

ddeboer commented Jun 8, 2017

Or on the server.

@fredpook
Copy link
Author

A solution for this kind of erratic "out of sync" behaviour could be to have the "simple" hassubject/hasobject queries handled by postgres like before.
These perform very fast in zotonic and don't need ES for improved fulltext search.
Just the combinations of text plus edge queries can be handled by ES

@fredpook
Copy link
Author

And this zotonic/zotonic#1722 will help too

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

No branches or pull requests

2 participants