-
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
IPublishedContentQuery.Search needs to support culture #3828
Comments
There are many Examine API changes made to support a much cleaner/simpler search interface that isn't a totally broken abstraction. Umbraco's own IEnumerable<IPublishedContent> TypedSearch(string term, bool useWildCards = true, string searchProvider = null);
IEnumerable<IPublishedContent> TypedSearch(int skip, int take, out int totalRecords, string term, bool useWildCards = true, string searchProvider = null);
IEnumerable<IPublishedContent> TypedSearch(Examine.SearchCriteria.ISearchCriteria criteria, Examine.Providers.BaseSearchProvider searchProvider = null);
IEnumerable<IPublishedContent> TypedSearch(int skip, int take, out int totalrecords, Examine.SearchCriteria.ISearchCriteria criteria, Examine.Providers.BaseSearchProvider searchProvider = null); There are several problems with these methods:
The updated 4 methods look like: IEnumerable<PublishedSearchResult> Search(string term, string indexName = null);
IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string indexName = null);
IEnumerable<PublishedSearchResult> Search(IQueryExecutor query);
IEnumerable<PublishedSearchResult> Search(IQueryExecutor query, int skip, int take, out long totalRecords); The result is now a wrapper of IPublishedContent that includes the Score. There is now 'useWildcards' because examine no longer has this parameter. If you pass a single term to Examine it will use it's underying The latter 2 methods now only accept a |
Have updated the first 2 methods to accept a culture: IEnumerable<PublishedSearchResult> Search(string term, string culture = null, string indexName = null);
IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string culture = null, string indexName = null); When a culture is specified it will go find all culture specific names for the culture specified (i.e. The 2 methods accepting |
code review is ok Testing, having issues. I have a content item which is variant, has different names on two cultures. A Checking the index, I can see that Name, Name_en-us, etc are all set correctly. Querying the External Index from the dashboard, works. Have republished the content item. I... have tried to look into I have tried to rebuild the index but then it becomes weirder. I can instantly rebuild the Internal Index, but the External Index rebuild never completes (keeps doing PostCheckRebuildIndex forever). |
more details: I have physically deleted the indexes, and restarted the site - indexes are rebuilt, but it does not change a thing (search fails, cannot rebuild external index) |
Problem with search is now issue #3920 Rest is OK, merging the PR now |
child of #3530
requires #3535
Be sure to review #3535 first!
IPublishedContentQuery.Search needs to support culture so that searching can be contextual to a language automatically
PR: #3892
... see notes below
The text was updated successfully, but these errors were encountered: