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

Filtering a list of geo locations

$
0
0

Hi,

I have an object which contains a list of geographic locations as this:

public List<GeoLocation> Locations{get; set;}

This list is being correctly (as far as I can see) indexed by EPiServer Find.

I would then like to use the Within method for each of the locations in the Locations-list to check if any of them are within the specified polygon specified in the Within method.

I've tried using MatchContained, which not really is an option - and also tried using Nested2Find (changing the Location-list to NestedList<GeoLocation> using as follows:

query.Filter(x => x.Locations, l => l.Within((IEnumerable<GeoLocation>) bounds));

but this throws an exception saying:

QueryParsingException[[myIndex_Dev] failed to find geo_point field []


Any ideas on how to accomplish what I'm looking for ?


Include more data on an PageData object

$
0
0

Hi,


First, I'm not using PageTypeBuilder in this project, but maybe I'm gonna add that for some specific page types.


Alot of the web pages are a collection of other pages, e.g. teaser pages and more specific in this case tabs.

Now I'm using the PageIndexer and sets some conventions, like;

PageIndexer.Instance.Conventions.ForInstancesOf<PageData>()
    .ShouldIndex(page =>
        PageTypesToIndex.Contains(page.PageTypeID) &&
        page["ExcludePageInSearch"] == null);

But how do I include more data to the pages, like tabs and teasers? The client class has IncludeField, so I tried that;

IClient client = Client.CreateFromConfig();
client.Conventions.ForInstancesOf<PageData>()
    .IncludeField(page => page.GetExtraContent());

GetExtraContent() is an extension method which loops through all tab pages and generates a string of all content. But the content this methods returns is not searchable. I can't see the content in 'Explore Index' either.


How can I add more content to an PageData so it's searchable?

 

Avoid indexing contentassetfolder/Media Images

$
0
0

Hi,

I've just integrated our episerver site with Find (Episerver version : 8, Episerver Find version: 9.2) . I tried to index from admin mode (using the content indexing job).

I'm seeing that our contentassetsfolder/media images are also getting indexed to Episerver Find Index. Can you please let me know how I can avoid indexing images/content assets folders.

Thanks in advance.

ContentIndexer IncludeField or ExcludeField?

$
0
0

Hi I am trying to use an API documented on http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/12/Integration/episerver-7-5/Indexing/

But the example for "ExcludeField" provided doesn't seem to work with Episerver.Find.Cms 12.2.4

ContentIndexer.Instance.Conventions  .ForInstancesOf<PageData>()  .ExcludeField(x => x.ACL)
The extension method ExcludeField is missing.. Am I missing a using??

Ideally I want to use an .IncludeField(x => x.something) if anyone knows if this also should exist?

Database schema update error when upgrading Find packages

$
0
0

I just upgraded the Episerver Find NuGet packages to version 12.2.8.

After restarting the site I get an exception saying: Column name or number of supplied values does not match table definition.

The error seems to occur when one of the SQL statements is executed:

[DataException: Failed to update database during execution of statement 'if exists (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'VW_EPiServer.Find.Cms.IndexingQueueReference')
    begin
insert into tblFindIndexQueue select Action, [Cascade], EnableLanguageFilter, Item, Language, TimeStamp FROM [VW_EPiServer.Find.Cms.IndexingQueueReference]
end']

Has anyone else seen this?

Edit: I tried running the 12.2.8.sql SQL script manually, and it is indeed outputting the error described above. I guess I'll dwell deeper into it... :)

Edit #2: Not sure I'd call it a solution, but the script worked if I modified the syntax to specify the target column names explicitly. In other words, I changed this...

insert into tblFindIndexQueue select [Action], [Cascade], [EnableLanguageFilter], [Item], [Language], [TimeStamp] FROM [VW_EPiServer.Find.Cms.IndexingQueueReference]

...to this:

INSERT INTO tblFindIndexQueue 
([Action], [Cascade], [EnableLanguageFilter], [Item], [Language], [TimeStamp])
SELECT [Action], [Cascade], [EnableLanguageFilter], [Item], [Language], [TimeStamp] 
FROM [VW_EPiServer.Find.Cms.IndexingQueueReference]

Clear index programatically

$
0
0

Hi,

I have a custom indexing scheduled job. The files that needs to be indexed varies based on few dynamic criterias. Hence I want my schedule job to clear all indexed data and start indexing afresh. So is there a way that I can clear the index programatically?

Load testing - Too Many Requests

$
0
0

Hi,

we've started load testing.  

When we send 10 requests per second, EpiServer Find returns with the error: The remote server returned an error: (429) Too Many Requests.

Our production index should be able to handle up to 75 queries per second (and the developer indexes are 25 queries per second).

Is this because we are hitting the index from the same IP address or could it be a configuration issue on our side? 

Thanks

Complex Find sorting

$
0
0

I have some difficulties in doing the sorting in Find.

I have the following structure:

class TimeBlock
{
DateTime StartDate
}

class Event
{
ContentArea Times
}

The goal is to sort events by closest future (more than DateTime.Now + x hours) StartDate of their TimeBlocks.

I tried to index all StartDates like this:

[Ignore]
        public virtual DateTime[] StartDates
        {
            get
            {
                var dates = Times?.FilteredItems
                  ?.Select(x => x.GetContent())
                  .Where(b => b != null)
                  .OfType<EventInfoBaseBlock>()
                  .DefaultIfEmpty(new CourseInfoBlock { StartDate = DateTime.MinValue })
                  .Select(x => x.StartDate).ToArray()
                  ?? new[] { DateTime.MinValue };
                return dates;
            }
        }



and then do the ordering

Find.Search<Event>().Filter.....
.OrderBy(p => p.StartDates, p => p, p => p.GreaterThan(hideBeforeDate), SortMissing.Last, SortOrder.Ascending, SortMode.Min



but I get an exception “No mapping found for [StartDates.$$date] in order to sort on”

I'll be grateful for any help.


Remove EpiFind

$
0
0

Due to an error that is happening right now, I would like to remove Epi Find from being used, while still maintaining the refrence in the projects so that they can be easily added back in again in the future.  Can anybody offer suggestions on how to go about doing that?

Minimum score of returned item

$
0
0

Hi.

I was unable to find any information on how to do this, or if it is even possible.

Anyway. Given the query FindClient.UnifiedSearchFor("Christmas tree") you could expect results containing "christmas", "tree", and possibly even "christ". They all receive different scores based on how good the match was. So if i have content explicitly about christmas trees it would receive a great score and end up at the top of the search. A page about "Our lord Jesus Christ" will receive less and end up further down the result set.

Lets say the best match got a score of 6, and the worst match got a score of 0.1. What I would want to be able to do is to tell my query that i want no hits worse than .5 in score difference compared to the best hit. Or at the very least. I want no hits with less than a score of 1. How would I go about doing this?

My real life problem is that when we search our site for a person, that person shows up on the top. But that persons name is comprised of words and part of words that match totally irrelevant article content which will also show up without having any real relevance to the person the user searched for.

//Martin

Indexing page with external content

$
0
0

Hi,

I have ha page that is getting its content from a extern sorce"available jobs".

How should i do to index this page in find when the content does not come from EPiServer CMS?

I have looked at Connectors but it seems unnecessary to have to pay for when it's just one page.

Indexing Error

$
0
0

Hi,

I'm trying to index a physical file in my computer as specified in http://find.episerver.com/Documentation/dotnet-api-attachments using the below code:

var document = new Document() { Name = fd.Name, Attachment = newFileAttachment(filePath) };

var result = client.Index(document, x => x.Id = fd.Id);

The document in the filePath is a pdf of size 6.5 MB. When I code executed the client.Index, I get an error - "Exception has been thrown by the target of an invocation. [Exception of type 'System.OutOfMemoryException' was thrown.]". Kindly let me know what is the reason for this and what can be done to avoid this error.

The given key was not present in the dictionary

$
0
0

Hello,

When I try to index a client's EPiServer site I often get the exception that the "given key was not present in the dictionary".  Does anyone know why the indexer job is throwing the exception?

Full error stack below.

Thanks

Danie

<exception><![CDATA[System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at EPiServer.Core.PageProviderBase.GetScatteredPages(IList`1 pageRefs, ILanguageSelector selector)
at EPiServer.Core.PageProviderBase.GetPagesBatched(IList`1 pageLinks, ILanguageSelector selector)
at EPiServer.DataFactory.GetPages(IList`1 pageLinks, ILanguageSelector selector)
at EPiServer.Find.Cms.PageDataExtensions.SearchSection(PageData page)
at EPiServer.Find.DelegateValueProvider`2.GetValue(Object target)
at EPiServer.Find.ClientConventions.FieldConventionBuilder`1.<>c__DisplayClass2.<>c__DisplayClass4.<ConvertBeforeSerializing>b__1(Object instance)
at EPiServer.Find.DelegateValueProvider.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)
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)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value)
at EPiServer.Find.Json.Serializer.SerializeToStringBuilder(JsonSerializer serializer, Object value, StringBuilder buffer)
at EPiServer.Find.Api.BulkCommand.Execute()
at EPiServer.Find.Client.Index(IEnumerable objectsToIndex)
at EPiServer.Find.Cms.PageIndexer.Index(IEnumerable`1 pages, IndexOptions options)

Multiple filter group

$
0
0

I want to search using the follwing filter condition. please check and let me know my syntax is ok or not?

Filter(x => x.Ancestors().Match(ContentReference.StartPage.ID.ToString())) and Filter(x => x.CategoryTag.Match(new ContentReference(category)))  and Filter(filterBuilder)

or

Filter(x => x.Ancestors().Match(ContentReference.StartPage.ID.ToString())) and Filter(x => x.CategoryTag.Match(new ContentReference(category)))  and Filter(HashfilterBuilder)

Syntax

result = SearchClient.Instance.Search()
                                                        .For(query)
                                                        .Filter(x => x.Ancestors().Match(ContentReference.StartPage.ID.ToString()))
                                                        .Filter(x => x.CategoryTag.Match(new ContentReference(category)))                                                       
                                                        .Filter(filterBuilder)
                                                        .OrFilter(HashfilterBuilder)
                                                        .Filter(x => x.Ancestors().Match(ContentReference.StartPage.ID.ToString()))
                                                        .Filter(x => x.CategoryTag.Match(new ContentReference(category)))
                                                        .OrderByDescending(x => x.StartPublish)
                                                        .Skip(offSet * pageSize)
                                                        .Take(pageSize)
                                                        .StaticallyCacheFor(TimeSpan.FromMinutes(0))
                                                        .GetPagesResult(LanguageSelector.AutoDetect());        

Limit properties included in Excerpt returned from UnifiedSearchFor

$
0
0

Is it possible to specify which properties that are included in the excerpt returned from UnifiedSearchFor?

Btw UnifiedSearchFor yields 0 results when searching at find.episerver.com, no docs available?


WebContent classes SearchMetaData and filtering with metadata value.

$
0
0

Hi,

We are using Unified search with connectors and we have two external sources to index. Both have SearchMetaData dates.

So I have tried to filter search results with the WebContent metadata date like show below.

"SearchMetaData": {
"date": {"StringValue$$string": "2016-09-29","$type": "EPiServer.Find.IndexValue, EPiServer.Find","___types": ["EPiServer.Find.IndexValue","System.Object"
            ]
        },
}

Example query:
query = query.Filter(x => DateTime.Parse((x as WebContent).SearchMetaData["date"].StringValue).After(date))


I know that I can get dates out like this in views but it seems like the query won't return any hits if you try to filter this way.


Is there any way to filter search results with metadata fields and how to do it if it's possible?

Any help would be appreciated.


Joni

Content indexing seems to get stuck and is fragile (EPiServer.Find.Cms 12.2.9)

$
0
0

Hi

Looks like in EPiServer.Find.Cms12.2.9 the content indexing is fragile and broken. At least, we have noticed major problems never seen before :)

The main issue is that the content indexing is not very robust. For example, it will fail if a content area contains a reference to a removed page because the indexer will no longer find the page. Normally Episerver checks if the rerefences are still valid to prevent this kind of errors. The implementation is in EPiServer.Find.Cms.ContentEventIndexer in method IndexPageQueue.

The indexing queue is in database table tblFindIndexQueue. All indexable content modifications will get queued here (the Scheduled Job "EPiServer Find Content Indexing Job" doesn't seem to use this table). If an entry fails, it will be stuck on the queue and prevent other entries from getting indexed.

If you are having problems with indexing, just check if an entry is stuck:

SELECT * FROM [tblFindIndexQueue];

If the query returns rows, and they stay the same for minutes, you could just delete the top row and see if this fixes the issue. But most likely the same page will get stuck when you modify it next time. To prevent this, you can fix the old references on a content area by modifying the area and saving the page - this will remove the obsolete references and prevent the indexing from failing later.

This is of course a workaround until the content indexing is fixed :)

Get most clicked results.

$
0
0

Anyone have any idea how to get the most clicked content over a certain time. 

For instance;

People have searched the site for a week. I want to get the most clicked results from last week, regardless of query.

Is there any support for this?

Thanks

Setting up episerver find to work well with a data-driven page type

$
0
0

I'm carrying out a technical analysis of using EPiFind to drive our websites search page. However, we have one specific page instance which I'm finding it hard to determine if EPiFind will cope with.

We have a page type which is data-driven, there is only one page instance. Given a url oursite.com/dataDrivenPage/foo/ a bit of routing takes place to mean you only hit this data driven page and the /foo/ is a parameter which is used to select a set of images, text and blocks which are then used to populate the page.

We'd need our search to work such that if a user searched for some text that was available on /foo/ they would get a search result for this foo page. The trouble is that behind the scenes there is only a single object and the text is stored in the DB not any properties/fields.

Perhaps my main issue here is I'm not sure if there is common terminology for this type of setup making it hard to search the web/forums for relevant information. If anyone has any links or knows what words are used to refer to this type of thing, please let me know?

Otherwise, I need to figure out if EPiFind will be able to handle this somehow. I expect a web crawler would have no problem dealing with this as it only sees the end-result, so perhaps I could use the crawler connector and turn it onto the episerver website itself (i.e. not using it for indexing external websites, which seems to be what it was created for) in order to effectively index these dynamically created pages.

Or perhaps there are better solutions?

Any help or guidance as to the feasibility of this would be much appreciated.

Search result filtering based on visitor group

$
0
0

If I have a piece of content (e.g. a html block) a user will not see when he is not part of a visitor group, I can still search for this content and get the page on which the content resides as a search result. Is there any to prevent this from happening? The situation I now have is that a user can search a specific search term, get a result, but he will never see the search term on the page in the search result, because he will not see the content (block) containing the search term.

Viewing all 6894 articles
Browse latest View live