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

Bad request from /find_v2/{*query} New Relic error

$
0
0

Seeing this in a couple of different site's New Relic error stats. Not massive counts but occuring every now and then.

/find_v2/{*query} 400 Bad Request

Listing occurences seems like /find_v2/_track is the path.

Haven't gotten hold of a complete occurence request data yet but someone might already know a cause or fix?


Not all pages are indexed - weird

$
0
0

Hello!

I have a site running EPiServer Find version 8.10.1.2073. There's been this weird problem for awhile (as long as I know)... Some pages are not indexed with the scheduled job. If a page that is not indexed is published again it then becomes indexed.

It doesn't have to do anything with PageType. For example, some ArticlePages are indexed and some are not. A page that has been indexed before can suddenly not be indexed. Pretty weird... The quota is not hit so there should be room for more pages to be indexed. Cleaning the index and then reindexing doesn't help. Has anyone experienced this before? Thankful for any help!

Episerver Find setup to Index multiple sites

$
0
0

Hey Guys,

I have episerver CMS experience, but still a rookie setting up Episerver Find in projects. 

So we have a website with 2 websites in it. (with 2 different startpages, using their own domain). 

My question is about setting up episerver find. 

I did the basics of installing the nuget packages, i created a free demo index, and setup the web.config. 

Now the indexing starts but it indexes everything in the same (demo)index. So both sites. 

What is the best practice/approach to search only pages which are in 1 site. Is that in the logic of the code or can we setup the index differently accomadate searching in specific content of 1 of the sites. 

I hope to hear about your thoughts. 

regards

Is indexing instances of EPiServer.Core.ContentFolder required?

$
0
0

When using EPiServer Find, does EPiServer need to index instances of EPiServer.Core.ContentFolder?

Is it safe to add an indexing convention to exclude this type from being indexed?

Would the only impact be that content editors would not be able to search for content folders in the EPiServer editor?

Thanks

Adam

Episerver Find autocomplete

$
0
0

Hello guys, 

I'm currently working on an autocomplete function within Episerver Find. I've seen some solutions already, but none of them seem to work for the case I want it to. 

I have a working autocomplete, but this autocomplete does not take into account the best bets, which I would like on top of the autocomplete return. The best bets are external urls and don't seem to work with PageData.

The current solution:

        public static SearchResults<string> AutoComplete(string q)
        {
            var result = SearchClient.Instance.Search<PageData>()
                .ApplyBestBets()
                .Filter(x => x.Name.PrefixCaseInsensitive(q))
                .Select(x => x.Name)
                .StaticallyCacheFor(TimeSpan.FromHours(1))
                .GetResult();
            return result;
        }

The solution I'm working on aswell (Where instead of the best bet, I'm struggling on the filters for autocomplete):

        public static IEnumerable AutoComplete2(string q)
        {
            var result = SearchClient.Instance.UnifiedSearchFor(q)
                .ApplyBestBets()
                .StaticallyCacheFor(TimeSpan.FromHours(1))   
                // Can't seem to get working filters here.
                .GetResult()
                .Select(x => new SearchItem(x))
            return result;
        }

Any feedback is appreciated!

400 Bad Request on clear index after upgrade

$
0
0

Hello!

After upgrading EPiServer.Framework from 9.5.0 to 10.10.4 and EPiServer.Find from 11.0.0.3701 to 12.6.1 we can't clear the Find index.

When I'm trying to clear our index from the editor mode I get an error saying "Unable to load /episerver/Find/proxy/_clear?clear_index=true&clear_stats=false status: 400".

After looking closer in the logs from our on-premise Find installation, this is the exact error from elasticsearch:

[2017-10-27 10:01:57,294][DEBUG][action.index             ] [ElectroCute] [my_index][3], node[MZVkl9ShQ2Op2mS2QtowqQ], [P], s[STARTED]: Failed to execute [index {[my_index][_clear][xmWM6b5YReKe7zoDsYv40Q], source[_na_]}]
org.elasticsearch.indices.InvalidTypeNameException: mapping type name [_clear] can't start with '_'
	at org.elasticsearch.index.mapper.MapperService.add(MapperService.java:198)
	at org.elasticsearch.index.mapper.MapperService.add(MapperService.java:186)
	at org.elasticsearch.index.mapper.MapperService.documentMapperWithAutoCreate(MapperService.java:393)
	at org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:287)
	at org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:210)
	at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:532)
	at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:430)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Note that this does not happen when I try with a Find index hosted by EPi, this is only for our on-premise solution.

New to EpiServer

$
0
0

Hello,

I am new to EpiServer and I am learning it while developing some stuff for a client. 

What my client needs is extensive search on metadata for pdf files and then show the pdfs that matches it.

Do you think it is wise to user EpiServer Find? Are there any basic tutorials to start with? I am looking for a start point. 

Thanks a lot. :)

EpIserver find understanding

$
0
0

So I have set up the Find module. When I create a project in VS I can select Find option and it sets up things nicely for me. 

Then I created a free index for me on cloud and included that in the web.config

I went in to the admin panel and indexed the content. Does it index all the content? What if I just want to index only one table from my database?

Secondly I get this code set when I create the project 

 public ViewResult Index(FindSearchPage currentPage, string q, string selectedAnalyzer)
        {
            var model = new FindSearchContentModel(currentPage)
                {
                    PublicProxyPath = findUIConfiguration.AbsolutePublicProxyPath()
                };
            //detect if serviceUrl and/or defaultIndex is configured.
            model.IsConfigured = SearchIndexIsConfigured(EPiServer.Find.Configuration.GetConfiguration());
            if (model.IsConfigured && !string.IsNullOrWhiteSpace(model.Query))
            {
                var query = BuildQuery(model, selectedAnalyzer);
                //Create a hit specification to determine display based on values entered by an editor on the search page.
                var hitSpec = new HitSpecification
                {
                    HighlightTitle = model.CurrentPage.HighlightTitles,
                    HighlightExcerpt = model.CurrentPage.HighlightExcerpts,
                    ExcerptLength = model.ExcerptLength
                };
                try
                {
                    model.Hits = query.GetResult(hitSpec);
                }
                catch (WebException wex)
                {
                    model.IsConfigured = wex.Status != WebExceptionStatus.NameResolutionFailure;
                }
            }
            model.Analyzers = CreateAnalyzers(selectedAnalyzer);
            RequireClientResources();
            return View(model);
        }

So I am not sure do I have to use this or what? How do I access my database table that I want to index and search? 


EpiServer Find index table

$
0
0

Is there a way to index a specific table in the database? 

MatchCaseInsensitive on collection of strings

$
0
0

Hi!

What is the default behaviour when you have MatchCaseInsensitive on a collection of strings?

filter = filter.And(f => f.ProductData().TopCategories.MatchCaseInsensitive(nodeContent.DisplayName));

Does this mean that you have to match all top categories or just on top categeory to fulfill the filter?

Thanks!

/Kristoffer

Beware: SearchClient.Instance.Settings.Languages not returning any languages

$
0
0

EPiServer.Find version 12.6.1
Newtonsoft.Json version="10.0.2" targetFramework="net46"

Just upgraded to latest nugets for FIND and CMS

Even Client.CreateFromConfig().Settings.Languages is not returning anything.

The underlying bug is: 

Message=Cannot get SerializationBinder because an ISerializationBinder was previously set.
Source=Newtonsoft.Json
StackTrace:
at Newtonsoft.Json.JsonSerializer.get_Binder()
at EPiServer.Find.Json.Serializer.CreateDefault()

Episerver Commerce - Markets are removed from index when product/variant are published from GUI

$
0
0

Hi!

We are using this query:

var result = query
                .FilterOnCurrentMarket()
                .FilterForVisitor(currentContent.LanguageBranch())
                .Skip((formModel.Page - 1) * pageSize)
                .Take(pageSize)
                .ApplyBestBets()
                .StaticallyCacheFor(TimeSpan.FromMinutes(10))
                .GetContentResult();

Works perfect on a new built index running the EPiServer Find Content Indexing Job 

In the index I find this:

"Markets": [
        {"Value$$string": "BASE","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "DA","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "DE","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "DEFAULT","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "EN","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "ES","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "FI","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "FR","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "KO","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "NL","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "NO","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "PL","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        },
        {"Value$$string": "SV","$type": "Mediachase.Commerce.MarketId, Mediachase.Commerce"
        }
    ],

So the FilterOnCurrentMarket works perfect.

If I add a category on a product/variant from Episerver GUI all items in the added category are pushed to the index without the "Markets" data.
This makes the category listing on our site all empty, nothing is returned.

Removing both these filters:

.FilterOnCurrentMarket()
.FilterForVisitor(currentContent.LanguageBranch())

Makes the product list work just fine again. And I have to remove both. Keeping either one of them makes the list empty.
For some reason the Markets (and other info) are not pushed to the index when triggered by a publish in the Episerver GUI.

This is really urgent because category listings are suddenly all empty. 
I cannot see this as anything other than a bug since the "Markets" data are published when the indexing job is run.

/Kristoffer

[Commerce 11.2.6]
[Episerver.Find.Commercer 10.0.1]

Elasticsearch version

$
0
0

Hi,

Which version of elasticsearch is the latest version of episerver find using?

Best regards,

Jeroen Slor

Filtering by contentreferences in contentarea

$
0
0

We have a property RelatedPages that is of type ContentArea and exists on all pages. The property is used to drag'n drop related pages.

We like to use EPiServer Find to filter out pages that has is related to the current page.

I.e

var searchResults = SearchClient.Instance.Search<SitePageData>()
.Filter(
(x => x.RelatedPages.Items.MatchContained(z => z.ContentLink.ID, currentPage.PageLink.ID)))
.GetContentResult();

This does not yield any results...

We have also tried this without luck:
var searchResults = SearchClient.Instance.Search<SitePageData>()
.Filter(
(x => x.RelatedPages.Items.Select(y => y.ContentLink.ID).Match(currentPage.PageLink.ID)))
.GetContentResult();

Any clues what could be wrong?

We have decorated the base class for pages SitePageData with [IndexInContentAreas].

Index content for all languages for Episerver Commerce in Find

$
0
0

Hi!

I'm using the Episerver.Find.Commerce to index my Commerce site, but I only get product and variations in one language.
What am I missing?

The index has all the existing languages included and there are a lot of products and variations translated but still there is no sign of them in Find index. I have also set up two local sites under Manage Websites. One for english and one for swedish and they are nicely showing products and variations in the right language.

Am I missing some configuration maybe?

Thanks!

/Kristoffer


Episerver Find Language change problem

$
0
0

Hi to all,

I am using episerver 11.3.0. I dont know how the Episerver find index size get changed based on the new language.

Is the index size varied based on the language like English to spanish?.

Thankyou In advance.

Duplicate SearchHit in UnifiedSearch

$
0
0

I am getting duplicate results when using UnifiedSearch. The query looks like this

var productResult = SearchClient.Instance.UnifiedSearch()
                .Filter(x => x.MatchTypeHierarchy(typeof(IProductVariant)))
                .FilterOnCurrentMarket()
                .FilterByCatalogNodes((request.CatalogNodes))
                .Skip(skip)
                .Take(take)
                .GetResult();

This should result in 1 result but I get 2 items, but only one of the hits returns correct object when running 

 var originalType = searchHit.OriginalObjectGetter.Invoke() as IProductVariant;

Debugging I can see that the two hits have 2 different search hit Ids (EPiServer.Find.UnifiedSearch.UnifiedSearchHit}.Id):

CatalogContent_2e5284c8-902a-4770-a7d1-9eec56cfcd9b_no and 
CatalogContent_a12bdcd8-f61a-43a5-9edc-36b8b604d919_no

The original object GUIDs (EPiServer.Find.UnifiedSearch.UnifiedSearchHit.Document.OriginalObjectType.GUID) are the same: 65285790-5efc-3066-9f17-69e8998c267c}

Any clues to why this happens?

Property of type string is considered as a Date deep inside in Elastic Search through its automapping if it's formatted as a Date

$
0
0

We get the following exception when indexing our contents.

2017-11-17 13:15:50,621 [8] ERROR EPiServer.Find.Cms.ContentIndexer: MYMACHINE: An exception occurred while indexing (Content): MapperParsingException[failed to parse [_Name]]; nested: MapperParsingException[failed to parse date field [My page title], tried both date format [dateOptionalTime], and timestamp number with locale []]; nested: IllegalArgumentException[Invalid format: "My page title"]; .

I read about it and the accepted solution was Joel Abrahamsson comment:

https://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2012/8/MapperParsingException-when-indexing/#60861

You're correct, there's automatic mappings going on and this is a tricky case. Fields needs to be mapped as a type in the index so the search engine knows how to parse and index them. Creating mappings is a tedious task if done manually. Luckily elasticsearch has support for automatic mappings using templates the first time it encounters a new field. What template is used can be determined by the type of data in the field and/or naming convention.
What you have run into is a problem caused by the lack of a date format in JSON. I'm guessing that the very first document that was indexed had a PageName that only contained a date. The search engine then recognized it as a date, as a string with a date is how a date is represented in JSON, and mapped the PageName field as date. When other documents with non-date-only PageNames were indexed they failed as the search engine was expecting them to contain dates.
At this point in time this is a limitation in Find, although I definitely think it could be alleviated in the future.


So I decided to give that solution a try, so, first I removed pages which names where a date.

Then:

  1. I emptied the Index and re-indexed. The same error occured when re-indexing.
  2. Then I deleted the Index, created a new one and Indexed. There was no error.

It seems that the error is still there after a Clear.

So, Is there still no solution to this?

The error is only in production for now, which is unfortunate, I really don't want to delete and create a new production index.

I'm thinking that there might be a solution like this?

Client.CreateFromConfig().Conventions.ForInstancesOf().Field(x => x.Name).Modify(x => x.DeclaringType = typeof(string));

But I'm not sure that that will affect anything deep down in Elastic Search?

How do we deal with this issue?

Guess we have to assume that the customer can name the first page of pagetype as a date and we should be able to handle that correctly!

Updating Find

$
0
0

Hi, I am updating Episerver and while updating Find to 12.6.1.0 It generated 3 SQL scripts.

My question is, should I run this scripts on CMS Database or Commerce Database?

Thanks.

Antonio

Episerver find Licence and Usage procedure

$
0
0

Hi to all,

I am using  E-commerce site at Episerver Commerce CMS. For Using the Search module I am using the Episerver.Find.Commerce Package. While getting the Find package I got 1 lacks Index permission(Paid amount for 1 lacks).with It, I used just 25000 indexes for my site but The Episerver find Itself used the 30000 index for its run purpose.

My question is Is that the 30000 index is getting from the 1 lacks Licence Index value? Or it is free of cost.

Thank you in advance.

Viewing all 6894 articles
Browse latest View live