Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I want to write an examine search that return files between tow dates come from property value so i tried to use range query here is my code :
var searcher = indx.GetSearcher();
ISearchResults results = null;
results = searcher.CreateQuery()
but i faced this error :
I did an article about this here:
Have a read of that and see if it helps. But basically you need to hook into start up and indexing events to manipulate the indexes.
I am facing the same issue. I follow yours instructions to create a custom index in order to do it as you mention and also to remove the time and keep only the date. The problem with that is that the index is not getting refreshed OnOublished or UnPublished event. Any suggestions with that? Because i don't want to ask the users every time the publish an article to rebuild the index manually.
Do you mean a custom index or a custom field on the External Index?
If you mean a custom index, you need to make sure you register the Index Creator, the Index Populate, and the ValueSetBuilder as well.
All parts work together to populate the index. If that's still not working to update the index, you might need to hook into Published and Unpublished events to trigger the correct update methods on your index.
I've not done much with completely custom indexes so if that's where the issue lies a bit of investigation would be needed. Might be worth a dedicated question on here :-)
To be more specific. I have a DateTime Picker on a DocumentType. Unfortunately ExternalIndex indexes the field as fulltext. That is not helpful at all because i cannot sort with this field and i cannot query for either a specific date or range of days. So i decided to follow yours very helpful article
in order to create a custom index. Everything is fine and works as expected except the onPublish and OnUnpublish events. The index is not getting refreshed as the ExternalIndex. Also i don't want overload the events with rebuilding the index because of performance issues. Any suggestions on how to do that?
I would like to mention that i was searching to send you an email yesterday for the same reason but unfortunately i couldn't find it, so thanks god i found you here, both articles for the custom index and for the default values were extremely helpful.
I'm available on Twitter (@hotchillicode) and on Slack if you want to share code so I can see what's going on. I've not had this issue with the code examples I've shared, they seem to update the indexes correctly so curious to see the difference as it seems a bit odd :-)
The approach in the article uses the standard Umbraco examine events to update values etc so there is no reason it shouldn't work which seems a bit odd.
thx a million
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted