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

Examine Search Range Query error on Date Time #7050

Closed
Samanoova opened this issue Nov 4, 2019 · 1 comment
Closed

Examine Search Range Query error on Date Time #7050

Samanoova opened this issue Nov 4, 2019 · 1 comment

Comments

@Samanoova
Copy link

Samanoova commented Nov 4, 2019

Hi
I want to write an examine search that return files between tow dates come from property value so i tried to use range query and here is my code :

var searcher = indx.GetSearcher();
ISearchResults results = null;
results = searcher.CreateQuery()
.Field("path", Umbraco.Media(124111).Path.MultipleCharacterWildcard()).And()
.Field("__NodeTypeAlias", "File").And()
.RangeQuery<DateTime>("fileDate".Split(','),Convert.ToDateTime("04/06/2017"),DateTime.Now)
.Execute();

but i faced this error :

image

@Samanoova Samanoova changed the title Range Query error on Date Time Examine Search Range Query error on Date Time Nov 4, 2019
@nul800sebastiaan nul800sebastiaan added state/needs-investigation This requires input from HQ or community to proceed and removed state/needs-investigation This requires input from HQ or community to proceed labels Nov 5, 2019
@nul800sebastiaan
Copy link
Member

Hey @MosabAbuzaid, I think your fileDate field is indexed as a text field and not as a date field, you might need to update that.

I would recommend you head to the forums where our friendly community can help you find the best solution for your requirements.
Make sure to head on over to https://our.umbraco.com and ask follow up questions there! 👍

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