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

Groupings with Find

$
0
0

I have indexed a bunch of products. Each product has an "area" (e.g. groceries, office,...) and a subarea (e.g. deli, meat, paper, pens). I need to do a query which returns the area/subarea tree for a subset of products.

That is, if e.g. I query for all products in store #1, I want to get:

groceries
  meat
office
  paper
  pens

(because store #1 has no products in the deli subarea).

While store #2 has only food items, hence it would return:

groceries
  deli
  meat

When doing this with linq to a db, I just used groupings. What is the correct way to do this with Find? Facets seem to return only counts, and not associations.


Filtering on nested objects/properties

$
0
0

Hi,

I have problem where I need to be able to filter on properties on subpages but return the parent page from FIND. I thought that I could use nested queries for this but i does not seem to work.

Page structure is as follows:

Education page 1 (info)

      -Event page 1 (Event)

      -Event page 2 (Event)

      -Event page 3 (Event)

Education page 2 (info)

      -Event page 1 (Event)

      -Event page 2 (Event)

etc

and the page types look like this (generalised):

public class Education
{ public Education(string name) {  Events = getChildren<Event>(this.contentID); } public string Name { get; set; } public string SokSemesters { get; set; } public string SokLocations { get; set; } public string SokTerms { get; set; } public List<Event> Event { get; set; } //Nested object
}
public class Event
{  public string Semester { get; set; }  public string Location { get; set; }  public string Term { get; set; }
}


I index both Education and Event pages and have access to them from FIND. I search over the Education type because I want to present educations in the search result (with events) and in filter options with count over how many educations each filter options result in (using facetts). The SokSemesters, SokLocations and SokTerms are a actually just collections(comma separated string) of corresponding properties on all the events that belong to a certain education. I use SokSemesters, SokLocations and SokTerms to generate the facetts.

Now to the tricky part. I want to be able filter on semester, location and term on the events and only returning matching educations. Between different types of filters AND should be used and within the same type of filter OR should be used (you can have multiple filters of the same type). I have tried something like this:

.Filter (X => x.Events, x => x.Location.MatchCaseInsensitive (Location);

But it does not seem to work, it does not filter educations correctly. So I am wondering if I am missing something about nested queries? Or is there any other way of doing this, for example by using a content area and putting the events there?

Thanks

Magnus

Filtering on Date part of DateTime

$
0
0

I need to filter only events that starts today, ignoring the time of day. I have tried with the following extension method:

        public static FilterExpression<DateTime?> AsDateMatch(this DateTime? value, DateTime matchValue)
        {
            return new FilterExpression<DateTime?>(x => x.Exists() & x.Value.Date.Match(matchValue));
        }

...but this does not work. It seems that x.Value.Date.Match(matchValue) are not allowed.


I use the extension method like this:

SearchClient.Instance.Search<Events>()
.Filter(x => x.StartDate.AsDateMatch(DateTime.Now.Date))
.GetResult();

EPiFind Indexing error

$
0
0

Hi 

When I ran find index on my commerce site, I received the following error, I have already spent a few hours, but still couldn't figure out what caused this. 

WARN EPiServer.Find.Cms.ContentIndexer: XXXXX-6JMQF72: An exception occurred during reindex operation. System.AggregateException: One or more errors occurred. ---> System.FormatException: Input string was not in a correct format.
   at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object[] args)
   at EPiServer.Find.Cms.ContentIndexer.IndexBatch(IEnumerable`1 content, Action`1 statusAction, Int32& numberOfContentErrors, Int32& numberOfBatchErrors, Int32& indexingCount)
   at EPiServer.Find.Cms.ContentIndexer.IndexBatch(IEnumerable`1 content, Action`1 statusAction, Int32& numberOfContentErrors, Int32& numberOfBatchErrors, Int32& indexingCount)
   at EPiServer.Find.Cms.ContentIndexer.<>c__DisplayClass12.<ReIndex>b__9(IEnumerable`1 currentBatch, ParallelLoopState loopstate)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`2 body)
   at EPiServer.Find.Cms.ContentIndexer.ReIndex(Action`1 statusAction, Func`1 isStopped)
---> (Inner Exception #0) System.FormatException: Input string was not in a correct format.
   at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object[] args)
   at EPiServer.Find.Cms.ContentIndexer.IndexBatch(IEnumerable`1 content, Action`1 statusAction, Int32& numberOfContentErrors, Int32& numberOfBatchErrors, Int32& indexingCount)
   at EPiServer.Find.Cms.ContentIndexer.IndexBatch(IEnumerable`1 content, Action`1 statusAction, Int32& numberOfContentErrors, Int32& numberOfBatchErrors, Int32& indexingCount)
   at EPiServer.Find.Cms.ContentIndexer.<>c__DisplayClass12.<ReIndex>b__9(IEnumerable`1 currentBatch, ParallelLoopState loopstate)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---



Limit the upload of index to Episerver

$
0
0

In our scenario the customer pays for a specific band width. Unfortunately there is no actual physical limit to this. So he/she can actually use more, but have to pay extra for it if it occurs over a longer period of time or very often. When Find sends it index to Episerver it uses all the bandwith available, meaning that it exceeds the limit that the customer has payed for.

The question is; is it possible to send the index in specific chunks or in other way limit how it is transmitted?

JsonSerialization fails for SEOInformation

$
0
0

Hi,

I get the following error in my log when Episerver Find tries to serialize ProductContent to Json. It works fine for NodeContent and CatalogContent, but for EntryContent it constantly fails via the "new" Event indexing. If I run the Episerver Find Content Indexing Job everything works fine. When I run the default serializer in EPiServer.Find.Json.Serializer I the stack trace points out SEOInformation[0] "Parent" as the issue.

I have the nuget packages Episerver.Commerce.FindSearchProvider and Episerver.Find.Commerce installed. The configuration files are setup as explained in the documentation.

Is there anyone who has experienced this previously and have a solution to the issue?

2016-03-03 14:22:58,323 [17] ERROR EPiServer.Find.Cms.ContentEventIndexer: An exception occurred while indexing (IContent). Exception has been thrown by the target of an invocation..System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: The provided content link does not have a value.Parameter name: contentLink   at EPiServer.Core.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)   at EPiServer.Web.Routing.Segments.NodeSegment.GetVirtualPathSegment(RequestContext requestContext, RouteValueDictionary values)   at EPiServer.Web.Routing.Segments.NodeSegment.GetVirtualPathSegment(RequestContext requestContext, RouteValueDictionary values, HashSet`1 usedValues)   at EPiServer.Web.Routing.ContentRoute.AddVirtualPathFromSegments(StringBuilder virtualPath, RequestContext requestContext, RouteValueDictionary values, HashSet`1 usedValues, Int32 lastNonDefaultIndex)   at EPiServer.Web.Routing.ContentRoute.GetVirtualPath(RequestContext requestContext, RouteValueDictionary values)   at EPiServer.Web.Routing.DefaultUrlResolver.GetUrlFromRoute(ContentReference contentReference, String language, RouteValueDictionary routeValues, RequestContext requestContext)   at EPiServer.Web.Routing.DefaultUrlResolver.GetVirtualPathInternal(ContentReference contentLink, String language, VirtualPathArguments arguments)   at EPiServer.Web.Routing.UrlResolver.GetUrl(ContentReference contentLink, String language)   at EPiServer.Find.Commerce.CommerceUnifiedSearchSetUp.GetContentUrl(ContentReference contentLink)   --- End of inner exception stack trace ---   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)   at System.Delegate.DynamicInvokeImpl(Object[] args)   at EPiServer.Find.UnifiedSearch.IndexProjection.GetUrl(Object o)   at EPiServer.Find.DelegateValueProvider`2.GetValue(Object target)   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)   at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)   at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)   at EPiServer.Find.Json.Serializer.SerializeToTextWriter(JsonSerializer serializer, Object value, TextWriter textWriter)   at EPiServer.Find.Json.Serializer.SerializeObjectsToJsonRequest(JsonSerializer serializer, IJsonRequest jsonRequest, IEnumerable values)   at EPiServer.Find.Api.BulkCommand.Execute()   at EPiServer.Find.Cms.ContentIndexer.IndexWithRetry(IContent[] contents, Int32 maxRetries)   at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 content, IndexOptions options)   at EPiServer.Find.Cms.ContentEventIndexer.IndexPageQueue()System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: The provided content link does not have a value.Parameter name: contentLink   at EPiServer.Core.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)   at EPiServer.Web.Routing.Segments.NodeSegment.GetVirtualPathSegment(RequestContext requestContext, RouteValueDictionary values)   at EPiServer.Web.Routing.Segments.NodeSegment.GetVirtualPathSegment(RequestContext requestContext, RouteValueDictionary values, HashSet`1 usedValues)   at EPiServer.Web.Routing.ContentRoute.AddVirtualPathFromSegments(StringBuilder virtualPath, RequestContext requestContext, RouteValueDictionary values, HashSet`1 usedValues, Int32 lastNonDefaultIndex)   at EPiServer.Web.Routing.ContentRoute.GetVirtualPath(RequestContext requestContext, RouteValueDictionary values)   at EPiServer.Web.Routing.DefaultUrlResolver.GetUrlFromRoute(ContentReference contentReference, String language, RouteValueDictionary routeValues, RequestContext requestContext)   at EPiServer.Web.Routing.DefaultUrlResolver.GetVirtualPathInternal(ContentReference contentLink, String language, VirtualPathArguments arguments)   at EPiServer.Web.Routing.UrlResolver.GetUrl(ContentReference contentLink, String language)   at EPiServer.Find.Commerce.CommerceUnifiedSearchSetUp.GetContentUrl(ContentReference contentLink)   --- End of inner exception stack trace ---   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)   at System.Delegate.DynamicInvokeImpl(Object[] args)   at EPiServer.Find.UnifiedSearch.IndexProjection.GetUrl(Object o)   at EPiServer.Find.DelegateValueProvider`2.GetValue(Object target)   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)   at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)   at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)   at EPiServer.Find.Json.Serializer.SerializeToTextWriter(JsonSerializer serializer, Object value, TextWriter textWriter)   at EPiServer.Find.Json.Serializer.SerializeObjectsToJsonRequest(JsonSerializer serializer, IJsonRequest jsonRequest, IEnumerable values)   at EPiServer.Find.Api.BulkCommand.Execute()   at EPiServer.Find.Cms.ContentIndexer.IndexWithRetry(IContent[] contents, Int32 maxRetries)   at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 content, IndexOptions options)   at EPiServer.Find.Cms.ContentEventIndexer.IndexPageQueue()

Boost results by publishing date - Find 7.5

$
0
0

I've an application using EPiServer Find 7.5 where we want to boost results based on either publishing or update date. I know Find version 9 has method UsingAutoBoost which boosts newer posts. The following code is very ugly and not veryfied. What is the preffered method to accomplish this in version 7.5?

var findQuery = SearchClient.Instance.Search<type>()
                .For(query)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-1), dateNow), 2)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-2), dateNow.AddMonths(-1)), 1.9)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-3), dateNow.AddMonths(-2)), 1.8)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-4), dateNow.AddMonths(-3)), 1.7)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-5), dateNow.AddMonths(-4)), 1.6)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-6), dateNow.AddMonths(-5)), 1.5)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-7), dateNow.AddMonths(-6)), 1.4)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-8), dateNow.AddMonths(-7)), 1.3)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-9), dateNow.AddMonths(-8)), 1.2)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-10), dateNow.AddMonths(-9)), 1.1)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddMonths(-11), dateNow.AddMonths(-10)), 1)
                .BoostMatching(p => p.SearchPublishDate().InRange(dateNow.AddYears(5), dateNow.AddMonths(-11)), 0);

Thanks

Any control of the language features?


UnifiedSearch yields no results in WebApi

$
0
0

Ok, this is pretty weird. When executing unified search in page controller context - it's working as expected (sample code):

 

public class SearchPageController : PageControllerBase<SearchPage>
{
    public ViewResult Index(SearchPage currentPage, string q)
    {
        var ctrl = new SearchController();
        var results = ctrl.Search(new SearchRequest { Query = q, PageSize = currentPage.ResultsCount });
        return View(new SearchPageViewModel(currentPage, q, results));
    }
}

    

WebApi controller:

public class SearchController : ApiController
{
    [HttpGet]
    public UnifiedSearchResults Search([FromUri] SearchRequest request)
    {
        var hitSpec = new HitSpecification
                      {
                          HighlightExcerpt = true,
                          ExcerptLength = 250,
                          PreTagForAllHighlights = "<strong><em>",
                          PostTagForAllHighlights = "</em></strong>"
                      };
        var results = SearchClient.Instance.UnifiedSearchFor(request.Query)
            .TermsFacetFor(p => p.SearchSection)
            .Skip(request.Page * request.PageSize)
            .Take(request.PageSize)
            .GetResult(hitSpec);
        return results;
    }
}

    

 

When accessing WebApi directly from client-side the same method it yields zero results (SearchRequest parameter in WebApi *is* binded correctly):

$.getJSON('/Api/Search/Search', { Query: q.val(), Page: 1, PageSize: 10 }, function (data) {
    alert(data);
});

    

Indexing not working

$
0
0

Hey,

What can be the problem when a page isn't indexed when you change or publish it. If I run the scheduled task it will pop up in my result, but not after a publish.

Do I need to add something to my solution?

/Jens

No "Excerpt" for files of type .pdf

$
0
0

Hi,

I get an Excerpt for all content types besides media type when it is a .pdf (I get excerpt on .docx for instance). I can see it indexes the .pdf content and I get the hit based on the content but no excerpt.

I use UnifiedSearchFor().

Any one got any idea? Thanks

Querying using Javascript

$
0
0

Hi,

We're querying the EpiServer index using javascript and the query DSL. What version of the API do you support on the EpiServer endpoint?

Quite a few examples in the, admitedly patchy, documentation don't work with the EpiServer index and I'm struggling to formulate the queries correctly.

For example, I'm trying to do a more like this on document IDs:

{"query": {"filtered": {"query": {"more_like_this": {"fields" : ["title", "description"],"like" : [
                {"_index" : "hpss","_id" : "1"
                }]
				}
			},"filter": {"term": {"___types": "com.okana.Document"
				}
			}
		}
	}
}

With a response like this:

{"error": "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[ctHumoCTTFCBdrUjP0KccQ][gordon_hpss][0]: SearchParseException[[gordon_hpss][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"filtered":{"query":{"more_like_this":{"fields":["title","description"],"like":[{"_index":"hpss","_id":"1"}]}},"filter":{"term":{"___types":"com.okana.Document"}}}}}]]]; nested: QueryParsingException[[gordon_hpss] [mlt] query does not support [like]]; }{[IttFE-HTTry6zDCpm-vLDw][gordon_hpss][1]: RemoteTransportException[[euw1bfinddev02esd02][inet[/10.54.4.202:9300]][search/phase/query]]; nested: SearchParseException[[gordon_hpss][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"filtered":{"query":{"more_like_this":{"fields":["title","description"],"like":[{"_index":"hpss","_id":"1"}]}},"filter":{"term":{"___types":"com.okana.Document"}}}}}]]]; nested: QueryParsingException[[gordon_hpss] [mlt] query does not support [like]]; }]""status": 400
}

Nested FilterFacet

$
0
0

Hi.

EPiServer Find 11 Client API introduced nested filtering. This is great, but I'm also looking for nested facets. Is this possible? I've looked at the following NuGet package: https://github.com/x2find/Nested2Find. This package however, doesn't contain any nested filterfacet function.

Are there any other APIs that I should use? Am I missing something?

Find Summaries

$
0
0

Is there a way to generate conceptual/contextual summaries in Episerver Find?

Thanks

Gordon

Tracking

$
0
0

I'm trying to get the autocomplete suggestions working.

When I do a query from C# I do the following:

                    IClient client = Client.CreateFromConfig();
                    int nMaxResults = 5;
                    var searchResult = client.Search<Document>(Language.English)
                            .For("banana")
                            .Take(nMaxResults)
                            .Select(x => new
                            {
                                Reference = x.Reference,
                                Date = x.Date,
                                Fields = x.Fields,
                                Title = x.Title.AsHighlighted(new HighlightSpec
                                {
                                    PreTag = "<strong>",
                                    PostTag = "</strong>"
                                }),
                                Content = x.Content.AsHighlighted(
                                  new HighlightSpec
                                  {
                                      PreTag = "<strong>",
                                      PostTag = "</strong>"
                                  })
                            })
                            .GetResult();

According to various bits of documentation, I'm supposed to add .Track() to the query but can't find it in the assemblies. I've added Episerver.Find and EpiServer.Framework using the instructions on here http://find.episerver.com/MyServices/Download

Where is the latest documentation on the C# API? It seems inconsistent/incorrect. 

Thanks

Gordon


'EPiServer Find Content Indexing Job' deletes commerce data

$
0
0

Using EPiServer.Find version 11.1.2.4113

This is what is logged in scheduled job history:

Indexing job [mysite] [content]: Reindexing completed. ExecutionTime: 17 minutes 32 seconds Number of contents indexed: 8909
Indexing job [Global assets and other data] [content]: Reindexing completed. ExecutionTime: 1 minutes 52 seconds Number of contents indexed: 1310 Number of content errors: 4

It consists of two parts:

  • 'mysite' reindex
  • 'Global assets and other data' reindex

Problem: While job is running commerce data is added in index and as a last step all commerce data is deleted, even tough it was just added to index

This is how it looks from fiddler:

For 'mysite' reindex:

a lot of:

POST http://es-eu-dev-api01.episerver.net/xxxx/_bulk HTTP/1.1

requests that indexes CMS data and that also include commerce data

as a last step this is sent over wire:

DELETE http://es-eu-dev-api01.episerver.net/xxxx/mysite/_query HTTP/1.1
Content-Type: application/json
User-Agent: EPiServer-Find-NET-API/11.1.2.4113
Host: es-eu-dev-api01.episerver.net
Content-Length: 330
Expect: 100-continue
Accept-Encoding: gzip, deflate
{"filtered":{"query":{"constant_score":{"filter":{"and":[
                  {"range":{"GetTimestamp$$date":{"from":"0001-01-01T00:00:00Z","to":"2016-03-18T11:11:47.0955583Z","include_lower":true,"include_upper":false
                        }
                     }
                  },
                  {"term":{"SiteId$$string":"4d260ec1-ec59-4bbf-8de4-2bf68eb15b9d"
                     }
                  }
               ]
            }
         }
      },"filter":{"term":{"___types":"EPiServer.Core.IContent"
         }
      }
   }
}

And thus far everything is fine, it would appear that only old content is removed and that is correct

Then second part is ran: 'Global assets and other data' reindex

also a lot of:

POST http://es-eu-dev-api01.episerver.net/xxxx/_bulk HTTP/1.1

requests, some of them fail with:

HTTP/1.1 413 Request Entity Too Large

should not to be related as that is only few missing items(andd all the commerce data was indexed in first part)

Then as a last request following is sent:

DELETE http://es-eu-dev-api01.episerver.net/xxxx/mysite/_query HTTP/1.1
Content-Type: application/json
User-Agent: EPiServer-Find-NET-API/11.1.2.4113
Host: es-eu-dev-api01.episerver.net
Content-Length: 396
Expect: 100-continue
Accept-Encoding: gzip, deflate
{"filtered":{"query":{"constant_score":{"filter":{"and":[
                  {"range":{"GetTimestamp$$date":{"from":"0001-01-01T00:00:00Z","to":"2016-03-18T11:29:19.5380677Z","include_lower":true,"include_upper":false
                        }
                     }
                  },
                  {"or":[
                        {"term":{"SiteId$$string":"00000000-0000-0000-0000-000000000000"
                           }
                        },
                        {"not":{"filter":{"exists":{"field":"SiteId$$string"
                                 }
                              }
                           }
                        }
                     ]
                  }
               ]
            }
         }
      },"filter":{"term":{"___types":"EPiServer.Core.IContent"
         }
      }
   }
}

And what that does is:

delete everything that is IContent and does not have property SiteId in index, so it deletes all of commerce data(Nodes, Products, Variations as all of them inherit from IContent)

something similar is fixed in current version: http://world.episerver.com/documentation/Release-Notes/ReleaseNote/?releaseNoteId=FIND-811

but still similar problem exist

Date ranges on Find stats

$
0
0

Hi all,

Is it possible to set date ranges on EPiServerFind stats?

It seems to be limited to only the last 24hrs/week/month/year. It would be really useful to specify particular time periods in order to compare them.

Thanks

How to reset the URL of the content Link in EPI.Find?

$
0
0

Hello All,

I have Implemented Epi.FInd for my Episerver application in version 9.2 by using MVC Razor.

SO intially I  executed the application through visual studio and it took the default root URL of the application as http://localhost:11109.Then I have run the EPiServer Find Content Indexing Job from admin mode and it took the root  URL of the searched contents as http://localhost:11109.

After this now I have hosted the application on IIS at my local machine only and I have restored .mdf database to my sql server 2014 DB.

Now search is working fine but the Root URL of the search result is same as earlier that's why those URL are Invalid.I want my root URL of the search content result to be updated as new one.

Does anyone is having idea how it can be achieved?

Simple Unified Search

$
0
0

Hi,

I've got a test index and have created a simple stand-alone project.

                     IClient client = Client.CreateFromConfig();
                     int nMaxResults = 50;
                    var dateRanges = new List<DateRange>()
                    {
                        new DateRange { From = DateTime.Now.AddDays(-1), To = DateTime.Now },
                        new DateRange { From = DateTime.Now.AddDays(-7), To = DateTime.Now.AddDays(-1) },
                        new DateRange { From = DateTime.Now.AddDays(-30), To = DateTime.Now.AddDays(-7) },
                        new DateRange { From = DateTime.Now.AddDays(-365), To = DateTime.Now.AddDays(-365) },
                        new DateRange { From = DateTime.Now.AddYears(-2), To = DateTime.Now.AddDays(-365) },
                    };
                    client.Conventions.UnifiedSearchRegistry.Add<Document>();
                   var searchResult = client.UnifiedSearchFor("Work", Language.English)
                            .Track()
                            .ApplyBestBets()
                            .Take(nMaxResults)
                            .RangeFacetFor(x => x.SearchPublishDate, dateRanges.ToArray())
                            .FilterFacet("PublishedDate", x => x.SearchPublishDate.InRange(new DateTime(1456790400), new DateTime(1459468800)))
                            .GetResult();
                    Console.WriteLine("There are " + searchResult.TotalMatching + " results");


When I run this I get the exception:

An exception of type 'StructureMap.StructureMapConfigurationException' occurred in StructureMap.dll but was not handled in user code

Additional information: No default Instance is registered and cannot be automatically determined for type 'EPiServer.Find.Framework.Statistics.IStatisticTagsHelper'

what am I doing wrong?

How to override price and inventory changes

$
0
0

I tried to follow the documentation from http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Commerce/9/Search/find-integration/indexing-variations-in-a-product-document/

But it seems quite out of date, as IndexContentsIfNeeded is no longer makred as virtual.

Can anyone provide me some sample pls?

Thanks in advance

Viewing all 6894 articles
Browse latest View live