Quantcast
Channel: Optimizely Search & Navigation
Viewing all 6894 articles
Browse latest View live

Highlighting matches when query contains international characters such as æ, ø, å

$
0
0

Hi,

It seems that the AsHighlighted() functionality doesn't work if the query contains international characters like the norwegian æ, ø and å. I get the correct search hit, but the matching word in the hit isn't highlighted. Can anyone else confirm this? Am I just doing something wrong?

BR
Lars Skjelbek


Find Admin Interface Displays No Results

$
0
0

Summary

When browsing to the Find admin UI in our production admin instance, no data is displayed in any of the individual admin parts. For instance, browsing to Episerver > Find > Overview > Explore shows a spinner and a "Retrieving data" message, but no results are displayed. 

However, searching for products on the site succeeds, as does searching for products in the catalog UI (we've configured catalog UI to use find for searching).

Details

Looking at the request made by the find admin UI, we see a request to /episerver/Find/_proxy/_search that returns a 500 error. the POST data is:

{"query":{"query_string":{"query":"*:*"}},"partial_fields":{"partial_source":{"include":"*","exclude":"*$$attachment"}},"facets":{"type":{"terms":{"field":"$type","size":100}}},"size":25}

The EventViewer on the server shows the following error:

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 3/15/2018 1:55:09 PM 
Event time (UTC): 3/15/2018 6:55:09 PM 
Event ID: 8d872657057542d89a99ece041ec6f41 
Event sequence: 22 
Event occurrence: 1 
Event detail code: 0 
Application information: 
    Application domain: /LM/W3SVC/2/ROOT-14-131656136125187215 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: D:\path\to\site\ 
    Machine name: MACHINE_NAME
Process information: 
    Process ID: 2176 
    Process name: w3wp.exe 
    Account name: IIS APPPOOL\App Pool Name 
Exception information: 
    Exception type: HttpRequestException 
    Exception message: Error while copying content to a stream.
   at System.Net.Http.HttpContent.d__44.MoveNext()
The CancellationTokenSource has been disposed.
   at System.Threading.CancellationTokenSource.ThrowObjectDisposedException()
   at System.Threading.CancellationTokenSource.InternalRegister(Action`1 callback, Object stateForCallback, SynchronizationContext targetSyncContext, ExecutionContext executionContext)
   at System.Threading.CancellationToken.Register(Action`1 callback, Object state, Boolean useSynchronizationContext, Boolean useExecutionContext)
   at System.Threading.CancellationToken.Register(Action`1 callback, Object state)
   at System.Net.Http.WinHttpResponseStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken token)
   at System.Net.Http.StreamToStreamCopy.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpContent.d__44.MoveNext()
Request information: 
    Request URL: https://admin.server.domain:443/epiAdminPath/Find/proxy/_search 
    Request path: /episerver/Find/proxy/_search 
    User host address: (omitted) 
    User: me 
    Is authenticated: True 
    Authentication Type: ApplicationCookie 
    Thread account name: IIS APPPOOL\App Pool Name 
Thread information: 
    Thread ID: 535 
    Thread account name: IIS APPPOOL\App Pool Name 
    Is impersonating: False 
    Stack trace:    at System.Net.Http.HttpContent.d__44.MoveNext()
Custom event details: 

Other searches in the admin that do not use the Find/proxy api appear to succeed. For example, navigating to EpiAdmin > Find > Configure > Boosting and using the "Preview the boosting effect" feature returns results. This request is a post to https://admin.server.domain/epiesrver/Find/api/editorialboosting/searchwithweights/ with the folowing payload:

{"query":"animal","language":null,"apply_best_bets":false,"weights":{},"apply_synonyms":false,"size":25}

Research

We found this support post, but I don't believe it is the cause of our problem. It mentions that the fix is to add an attribute to httpRuntime in web.config of targetFramework='4.6.1', but I don't believe that targetFramework is a part of the schema for httpRuntime, but rather system.web/compilation. (we already have a targetFramework='4.7.1' on the compilation element)

Versions

We're using 

  • CMS 11.3.2
  • Commerce 11.8.1
  • Find and Find.UI 12.7.1
  • Find.Commerce 10.1.0

Environments

This is happening in our CI environment and our Production environment, one with a developer and another with a production index. Therefore, I know it's our code or library code that's the problem, and not network or environment problems.

Apply A filter on every search request

$
0
0

I apologize if this has been answered already but i can't seem to locate the answer.

I am looking for a way that on every time we do a search, we apply a filter on every request.  So by example,  i want to filter results based on Site.  Is there a way that instead of using .FilterOnCurrentSite() on every single query we have, is there a way to do this automatically on every query?

Thanks in advance.

UsingSynonyms doesn't work

$
0
0

UsingSynonyms doesnt work. Returns 0 results. Anything wrong with my syntax? I have tried appplying UsingSynonyms at the end of my query as well, same result.

We are not using Unifiedsearch by the way. We are searching for a specified <MyType>.

The query also adds in Boostmatching and Facets.

Version: 12.2.0

query = query.For(searchTerm, q =>
                {
                    q.Query = searchTerm;
                }).UsingSynonyms()
                    .InField(x => x.ItemName)
                    .AndInField(x => x.Code)
                    .AndInField(x => x.ParentCategoryNames)
                    .AndInField(x => x.ItemTradeMarkName)
                    .AndInField(x => x.ItemPrimaryVendorId)
                    .AndInField(x => x.ItemPc1VendorsitemId)
                    .AndInField(x => x.ItemEOProducer)
                    //.AndInField(x => x.ItemIngredience) //kommentert ut; SG-3276
                    .AndInField(x => x.ItemPc2AdvertisingText);
                if (trackSearchTerm)
                {
                    query = query.Track();
                }

AutoComplete Feature and Query Limitatoins.

$
0
0

I want to use AutoComplete feature of EPiFind. Does autocomplete search adds into limitation of 75 query per second?

Cheers

Caching not working in Azure

$
0
0

We are using Find heavily on our site, and have added caching using 

.StaticallyCacheFor(TimeSpan.FromMinutes(_defaultCacheTimeInMinutes)) // for GetResult()

or

.GetContentResult(cacheForSeconds:3600, cacheForEditorsAndAdmins:true) // for GetContentResult()

I have added proxy settings to web.config and verified that caching is working locally (query is exceuted once).

But on Azure we get a lot of errors indicating that the results are not cached (EPiServer.Find.ServiceException: The remote server returned an error: (429) Too Many Requests.)

Anyone seen similar behavior? Or know what to look for?

how to add column to PowerSlice data

$
0
0

I have added powerslice tool in my Episerver Find website. I need to add one more column to the data/pages that appear in powerslice. There is first column as pagename, second column as word "Published" so in that I need to add column as "FolderName".

Plz let me know the workaround.

Thanks in advanced

Indexing custom POCO

$
0
0

Hi,

I'm trying to index a custom POCO instead of variants for performance reasons. When following the guid at: https://world.episerver.com/documentation/Items/Developers-Guide/Episerver-Commerce/9/Search/find-integration/indexing-poco-objects-instead-of-catalogcontentbase/ it says to disable indexing of CatalogContentBase and to override CatalogContentEventListener actions.

This is weird because if I disable the indexing of CatalogContentBase the action methods will never be hit and my custom POCOs won't be indexed either. 
So this looks like a catch-22. I can't disable indexing of variants and when not disabling it's indexing both variant and POCO?

Does anyone have experience with indexing POCO's?

PS.

I'm trying this because of the number of results that we're returning from a query (aprox 900 items) and the default implementation loads the Variant from the database (slow) even when using projections! 

/Mark


Episerver Find Search Statistics Click tracking search result issue

$
0
0

I am trying to implement click tracking using EPiServer Find for a CMS application. I am able to generate the statistics but the page name in the search results is showing up as page not found.

Below is a screen shot for reference: https://www.screencast.com/t/ywkYtn9L

Any info on this will be of great help to me.

Filtering categories using OR filters inside an AND filter

$
0
0

I am currently creating a service using Episerver Find. I have managed to get everything working apart from the filtering of Categories. From the API that is recieved in the solution, we get a multiple lists of Categories that have been selected inside a category list.

E.g. 

Categories: 
[
    ["Category 1","Category 2"
    ],
    ["Category 11","Category 12"
    ]
]

After this, when searching using Find, I need to check for items that have "Category 1" OR "Category 2" AND "Category 11" OR "Category 12". If none of the items have these categories assigned to them, or as an example only have Category 1 assigned and nothing from the second list, no results should be returned.

I can not seem to find a way to do this. I Have tried a Filter Builder using the OR method and then passing that into the the Search.Filter() method but that seems to get changed to an OR filter instead of an AND filter. Here is the code of that just in case I there is a mistake

        public static ITypeSearch MatchCategories(
            this ITypeSearch search, IList categoryList)
        {
            var categoryFilter = SearchClient.Instance.BuildFilter();
            foreach (var category in categoryList)
            {
                categoryFilter =
                    categoryFilter.Or(x => x.RelatedCourses.MatchItem(p => p.CourseCategories.Match(category)));                
            }
            return search.Filter(categoryFilter);
        }



Media assets pane search not working

$
0
0

Hello guys

Can someone help me understand why I can't search, by name, in the media assets pane? There's lots of pdfs and docxs but they do absolutely not show up when searching. I can search by their ID though, but need to be able to search by name.

Image 1 https://imgur.com/MLHbPP6 shows the media pane.

Image 2 https://imgur.com/7dDU25C shows search query "inbjudan" and no hits, though there should be several hits (don't know exactly how many).

Image 3 https://imgur.com/AdzTwUg shows searching in the Find admin page for "inbjudan" with lots of document hits including the one I'm looking for (circled).

As far as I can see there hasn't been any tampering with what gets indexed in any of the IInitializableModule-files.

Have anyone seen this before?

Regards,

Patrik

Strange Find results in multilanguage Alloy site

$
0
0

I've just installed the latest version of AlloyTech, running on Episerver 11.4 with Episerver Find 12.7.1. I've created a developer Find index for testing, and specified both Norwegian and English for this index. I've made the following changes to the site:

  1. Added Norwegian as a language
  2. Removed Swedish
  3. Translated a few items to Norwegian (the Start page, the Alloy Plan page, and the Jumbotron on the Start page).
  4. Re-indexed the site (of course)

My name ("Anders") and the word "møtes" (relexive of "to meet") both occur exactly ONCE among my translated items. But...

Searching for "møtes" on the site gives 0 hits:

Searcing for "møtes" on the site

Seaching for my name "Anders" is just as strange, this gives 17 hits:

The interresting thing, is that this does not correspone one-two-one with what I find in the Find index itself. 

Searching for "møtes" in the Find index gives exactly ONE hit, as it should:

Searcing for "møtes" in the index

Searching for "Anders" in the Find index also gives the single hit it should:

Why do I get this discrepancy between hits in the index and what I see on the Alloy page? I'm building a demo for a Norwegian customer, so it's kind of important that I can show them that searching in Norwegian works fine... :)

Nested Convetion not working for extension methods

$
0
0

Hi, I have an extension method that returns an list of object with properies that I want to be able to filter and sort on.

clientConventions.ForInstancesOf<WebProduct>().IncludeField(document => document.FindVariations());
clientConventions.NestedConventions.ForType<WebProduct>().Add(document => document.FindVariations());

But when I try to filter or sort on the extension method I get an error saying that the it isn't a nested object. And if I look in the index I can see that the property is missing the $$nested sufix.

"FindVariations": [
        {"$type": "Avensia.Storefront.Starter.Infrastructure.Find.Models.FindWebVariation, Avensia.Storefront.Starter",
}

Thi problem only seems to happen when its an extension method.

According to https://world.episerver.com/documentation/developer-guides/find/NET-Client-API/searching/nested-queries/ this should work and I can't find anything suggesting otherwise.

Pagination not working with Find

$
0
0

Hi,

I am using Find and implementing pagination as well for search. But my result set always returns 25 instead of showing 6 results in each page. Could anyone please have a look at my code below and point out what I need to do differently.

int pageSize = 6;
int pageNumber = (page ?? 1);
IClient client = SearchClient.Instance;
var model = new SearchViewModel(currentPage, q);
if (String.IsNullOrEmpty(q))
{
return View(model);
}

var searchResults = client.Search<ArticlePage>().For(q).Select(x => new ArticleListViewModel
{
ArticleCategory = x.ArticleCategory,
Created = x.Created,
PageTitle = x.PageTitle,
ArticleImage = x.ArticleImage,
ArticleLink = x.ExternalURL,
Author = Helper.GetAuthorName(x.Author),
Link = Helper.GetInfoPage(x.Author),
}).Skip((pageNumber - 1) * pageSize).Take(25).GetResult();

Exclude category from being indexed.

$
0
0

Hi,

Is it possible to exclude a specific catalog or commerce category from being indexed in Find?


Sorting by publish date doesn't work

$
0
0

Hi,

I have a problem with sorting my search results. Below you have two types of searching:

Using Unified search:

var unifiedSearch = searchClient.UnifiedSearch()
                .For(model.Query)
                .OrderBy(x => x.SearchPublishDate)
                .GetResult();

Using Search:

var typeSearch = searchClient.Search<SearchViewModel>()
                .For(model.Query)
                .OrderBy(x => x.PublishDate).
                IncludeType<SearchViewModel, SitePageData>(x => new SearchViewModel
                {
                    Name = x.Name,
                    PublishDate = x.StartPublish
                }).GetResult();

In unified search everything works fine. My results are sorted by SearchPublishDate as expected. The problem is in the second query. It returns the same results as the first one but the order is different. It seems to be ordered by score instead of PublishDate. Any sugestions what am I doing wrong?

Using Find in a non episerver application

$
0
0

Hi All,

I'm building a bot based on the ms bot framework and i'd like to be able to connect to our Find index.

I added the Episerver Find Nuget package to the project and configured the app settings to connect to the index

The issue I have is that all of the search objects require a type when searching .. for example:

var searchResult = client.Search<BlogPost>()
                        .For("Beethoven")
                        .GetResult();
This example requires the type of "BlogPost"

Is what I am trying to do possible or does it need to be linked with the CMS?

Any help, much appreciated.

Thanks,

Paul

EPiServer.Find.Commerce 10.1.2 Unable to Load One or More of the Requested Types

$
0
0

Hello,

We are trying to upgrade to EPiServer 11.  We got to the point of being able to update the database, but then receive the below message after that occurs.

Server Error in '/' Application.
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source Error: 
[No relevant source lines]
Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\26afe35f\1bf18c55\App_global.asax.0.cs    Line: 0 
Stack Trace: 
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.Assembly.GetTypes() +112
   EPiServer.Find.ClientConventions.<>c__DisplayClass17_0.<MarkAllImplementationsAsNested>b__1(Assembly a) +30
   EPiServer.Find.Helpers.ListExtensions.ForEach(IEnumerable`1 value, Action`1 action) +153
   EPiServer.Find.ClientConventions.NestedConventions.MarkAllImplementationsAsNested(Type declaringType, String name) +352
   EPiServer.Find.Commerce.CatalogContentClientConventions.ApplyNestedConventions(NestedConventions nestedConventions) +298
   EPiServer.Find.Commerce.CatalogContentClientConventions.ApplyConventions(IClientConventions clientConventions) +181
   EPiServer.Find.Commerce.FindCommerceInitializationModule.Initialize(InitializationEngine context) +178
   EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +55
   EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +123
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +248
[InitializationException: Initialize action failed for Initialize on class EPiServer.Find.Commerce.FindCommerceInitializationModule, EPiServer.Find.Commerce, Version=10.1.2.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +834
   EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +198
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +876
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +225
   EPiServer.Global..ctor() +103
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\26afe35f\1bf18c55\App_global.asax.0.cs:0
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +142
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1515
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +186
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +79
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +281
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +329
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +118
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +708
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2558.0

We are using EPiServer.Find.Commerce 10.1.2 and are on EPiServer CMS 11.5.0, EPiServer Commerce 11.8.3, and EPiServer Find 12.7.1.

I've cleared the bin and obj folder, deleted all Temporary ASP.Net files, reset IIS (I'm using local IIS instead of IIS Express), and cleaned the solution and still running into the same issue.

Any thoughts would be greatly appreciated.

Thank you,

Kevin Larsen

Only search full word using For

$
0
0

Hi,

I am trying to search for whole word but EPiFind returns many results whereas it should only return 1 result.

the keyword is 5ianR5MTE6eMQIPw3iE1TjLqzW7No7_R

  query = query.Search(x => x.For(videoPage.LegacyVideoId, q =>
                    {
                        q.Query = "5ianR5MTE6eMQIPw3iE1TjLqzW7No7_R";
                    }).InField(a => a.LegacyVideoId));

When i change the q.Anaylzer = "keyword" as it is mentioned in elastic search but it does not return any value?

[BUG] OriginalObjectGetter is missing for WebContent

$
0
0

Hi,

OriginalObjectGetter is missing for WebContent. Is this by-design? This means we can't do following:

private static WebContent GetWebContent(UnifiedSearchHit hit)
{
    if (hit.OriginalObjectGetter != null)
    {
        var original = hit.OriginalObjectGetter.Invoke();
        if (original is WebContent)
        {
            return (WebContent)original;
        }
    }
    return null;
}
Viewing all 6894 articles
Browse latest View live