-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
V9 Examine Examine examineQuery.Execute(queryOptions) Not Working #10462
Comments
FIxed here Shazwazza/Examine#234 but the CMS needs to be updated to point to the new Examine version. That should be a very good/easy PR to make if anyone in the community has time? |
Hi @DavidArmitage, We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know. For more information about issues and states, have a look at this blog post Thanks muchly, from your friendly Umbraco GitHub bot :-) |
Hi @Shazwazza @nul800sebastiaan I am happy to take this task on. I am been looking to get involved with contributing and this might be a great starting point. Can one of you give me a few pointers how to get up and running. This task might take a bit more time getting me up and running but I plan to be regularly contributing to other stuff. If anyone can help get me up and running that would be amazing. Regards David |
Hello @DavidArmitage, I'm on my way to update the Examine version but a notification popped up on the current tab. Happy to help with your first contribution! This documentation helped me a lot. https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/.github/CONTRIBUTING.md Steps that might help you get it up and running: Steps for contributing: |
Great. Thanks. I will take a look and try and get up and running. I will have a better look tomorrow when I have more time on my hands. |
Just so you know what we are going to expect: the relevant |
Oh, don't mind me, forgot this was for v9! 😅 So once you get it up and running, update the Examine NuGet package in the projects it's currently installed in, don't think we need more than that. |
I managed to fork and cone down V9. I checked out the V9/dev branch. I was able to build using gulp as described here (no errors here). I was also able to build using Visual Studio (no errors here). When I run the project for the first time I am getting errors. Did you guys get this error with your first build / run? Any ideas? |
Hello @DavidArmitage, May I ask what instance are you using to run it? I think on V8 we're certainly looking into As for Umbraco 9 haven't really look and play around with |
It kinda looks like you're on the v8 branch @DavidArmitage, I would recommend you delete your local clone, clone it again and then switch to v9/dev. That should give you a nice and clean folder to work with. If you already have v8 temp files laying around it might not clean up so nicely when switching from the v8 to the v9 branch 😄 |
Ah, actually, no, just saw the file explorer on your screenshot, looks like v9! @vlaellayug is right, you need to change the startup project to |
Thanks Guys. It looks like I am up and running now. |
Ah I see this one is still open, the CMS was later updated to the latest version (beta-154), so I'll close this issue! |
Which Umbraco version are you using?
Umbraco version 9.0.0-beta003
Bug summary
There is a bug with the Examine Query.
It seems to only return data for the first page. Page 2 or anything about never seems to bring back any data.
Specifics
Here is the code I am using to query examine.
int pageIndex = blogSearch.CurrentPage - 1;
int pageSize = blogSearch.ItemsPerPage;
//###This should be the correct way to do this but there is still a bug with the umbraco core code.
//###For some reason it only brings back results for the first page and nothing above
QueryOptions queryOptions = new QueryOptions(pageIndex * pageSize, blogSearch.ItemsPerPage);
ISearchResults searchResult = examineQuery.Execute(queryOptions);
IEnumerable pagedResults = searchResult;
int totalResults = Convert.ToInt32(searchResult.TotalItemCount);
blogSearch.TotalItems = totalResults;
blogSearch.TotalPages = (totalResults + blogSearch.ItemsPerPage - 1) / blogSearch.ItemsPerPage;
blogSearch.BlogDetailsPages = GetBlogArticlesFromSearch(pagedResults);
This seems to work fine just for the first page but if you pass in page 2 or anything above in with the QueryOptions then no results get returned.
I can confirm all the other data seems correct such as the total results, number of pages etc.
It just doesn't seem to be returning the correct results.
Steps to reproduce
Run a Examine query using QueryOptions.
If you test on page one it works.
If you test on page 2 no results are returned
If you test on any page about page 2 no results are retuned.
Eg..
QueryOptions queryOptions = new QueryOptions(pageIndex * pageSize, blogSearch.ItemsPerPage);
ISearchResults searchResult = examineQuery.Execute(queryOptions);
Expected result / actual result
Results should be returned for each page.
The text was updated successfully, but these errors were encountered: