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

How to Filter a specific page type by page reference property of this page where this reference's metadatatitle is " events"

$
0
0

 How to Filter a specific page type by page reference property of this page where this reference's metadatatitle is " events"

Can anyone help me to make this happened . This is very urgent for my project


Property 'PageName' does not exist, can only assign values to existing properties

$
0
0

Hi all,

I have installed EPiServer Find version 1.0.0.343 to an CMS 6 R2 site. Indexing, browsing the index etc are working as it should, but when I try to do a search trough the API it fails. Have I missed something basic?

Code:

IClient client = EPiServer.Find.Client.CreateFromConfig();
var searchQuery = Request.QueryString[QueryParameters.SearchParameterName];
IQueriedSearch<PageData, QueryStringQuery> queriedSearch = client.Search<PageData>().For(searchQuery);
SearchResults<PageData> searchResults = queriedSearch.GetResult();

Gives error:

Line 28:             
Line 29:             IQueriedSearch<PageData, QueryStringQuery> queriedSearch = client.Search<PageData>().For(searchQuery);Line 30:             SearchResults<PageData> searchResults = queriedSearch.GetResult();Line 31: 
Line 32:             if( category != null)


Source File: c:\EPiServer\Sites\Customer\src\Project\Templates\Pages\Search.aspx.cs    Line: 30 

Stack Trace: 

[EPiServerException: Property 'PageName' does not exist, can only assign values to existing properties]
   EPiServer.Core.PageData.SetValue(String index, Object value) +182
   EPiServer.Core.PageData.set_Item(String index, Object value) +40
   EPiServer.Core.PageData.set_PageName(String value) +43
   SetPageName(Object , Object ) +131
   Newtonsoft.Json.Serialization.DynamicValueProvider.SetValue(Object target, Object value) +158
[JsonSerializationException: Error setting value to 'PageName' on 'EPiServer.Core.PageData'.]
   Newtonsoft.Json.Serialization.DynamicValueProvider.SetValue(Object target, Object value) +283
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) +694
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) +1931
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) +524
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) +189
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) +739
   Newtonsoft.Json.Serialization.JsonSerializerProxy.DeserializeInternal(JsonReader reader, Type objectType) +81
   Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) +47
   EPiServer.Find.Api.SearchHitConverter.PopulateItemProperty(JsonReader reader, JsonSerializer serializer, Type objectType, Object item) +194
   EPiServer.Find.Api.SearchHitConverter.PopulateProperty(JsonReader reader, JsonSerializer serializer, Type objectType, String propertyName, Object item) +92
   EPiServer.Find.Json.IgnoredPropertiesHandlingConverterBase.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) +625
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) +292
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) +1355
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) +858
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) +238
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) +597
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) +1931
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) +524
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) +189
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) +597
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) +1931
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) +524
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) +189
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) +739
   Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) +1663
   Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) +47
   Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader) +128
   EPiServer.Find.Api.Command.GetResponse(IJsonRequest request) +270
   EPiServer.Find.Api.SearchCommand`1.Execute() +720
   EPiServer.Find.Client.Search(SearchRequestBody requestBody, Action`1 commandAction) +306
   EPiServer.Find.SearchExtensions.GetResult(ISearch`1 search) +349
   Customer.Web.Templates.Pages.Search.OnInit(EventArgs e) in c:\...\Search.aspx.cs:30
   System.Web.UI.Control.InitRecursive(Control namingContainer) +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +489

I can see in Fiddler that the result from es-api01.episerver.com has a value for PageName$$string=Tittel på side

What am I missing here?

Unclear documentation for autoboosting with decay

$
0
0

Hello

I'm have a hard time understanding and using autoboosting with decay.

The customer wants newer pages to generally be more relevant.

The documentation is quite unclear in my opinion:

http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/12/DotNET-Client-API/Searching/auto-boosting/

The example in the beginning uses TimeSpan.FromDays(14) as decayScale

Then the tables explaning the effect mentions "20" as a value for decayScale. 20 what? Days?

Then in the spreadsheet example that is linked where you can test the effect scale has a value of 0,1.

I have tried setting different values in my code (that looks pretty much like the first example in the documentation), but I can't se any effect no matter what I set decayScale to...

Hope someone can help, and please make the documentation more clear.

Is the cms search effected by the contentindexer conventions

$
0
0

Hi,

I'm adding some contentindexer conventions to add / exclude pages from being indexed. Are these conventions also applied to the cms search?

Excerpt being build incorrectly

$
0
0

I have following page type:

public class InformationPage : PageData
{        ...
        public virtual string Ingress { get; set; }
        ...
        public virtual XhtmlString MainText { get; set; }
}

I configure Excerpt as following:

SearchClient.Instance.Conventions.UnifiedSearchRegistry.CustomizeDefaultProjection(p =>
    p.ProjectExcerptUsing(spec =>
         x => x.Ingress ?? x.MainText.AsViewedByAnonymous().AsCropped(100))
    );

But when I search and access the Excerpt field of UnifiedSearchHit, I see that it contains the text of Title. For example, if I have following page with a title and ingress:

Lorem ipsum dolor sit amet

Pellentesque est lacus, tincidunt id viverra quis, auctor sit amet eros. Ut et gravida nisl. Cras tincidunt metus in lacus feugiat porta. Vestibulum aliquet accumsan mauris, non consequat ante consectetur porta. Phasellus et lacus mi. Nunc tincidunt nibh vitae magna pellentesque, non mollis arcu mollis. Mauris commodo, ex et porttitor laoreet, purus eros fringilla urna, eget luctus odio felis nec lorem.

The Excerpt of this page looks like following 

Lorem ipsum dolor sit amet Pellentesque est lacus, tincidunt id viverra quis, auctor sit amet eros. Ut et gravida nisl. Cras tincidunt metus in lacus feugiat porta. Vestibulum aliquet accumsan mauris, non consequat ante consectetur porta. Phasellus et lacus mi. Nunc tincidunt nibh vitae magna pellentesque, non mollis arcu mollis. Mauris commodo, ex et porttitor laoreet, purus eros fringilla urna, eget luctus odio felis nec lorem.

Note that the Excerpt begins with the title. Anyone exprienced this? How can I solved it without manual sanitation?

Site specific Best Bet

$
0
0

So, we have a solution with 3 sites specified, each of them having their own Best Bets. The question I have is if one can specify from which site you should get the Best Bets? The solution is today having a search solution, in which you can select from which site you should get the search result, regardless of which site you have landed on. 

For example, lets say the sites are called "siteone", "sitetwo" and "sitethree". "Banana" is added as a Best Bet for "sitetwo". When you are on www.siteone.se, and you search for "Banana" but select to search in "sitetwo", you don't get the Best Bet "Banana" (even though we provide the siteid as a filter). 

However, if you go to www.sitetwo.se, and ask to get search result for "sitetwo" you get "Banana" as Best Bet result.

I guess the reason to this is that ApplyBestBets() is context aware, taking the current site request into consideration and ignoring that we have provided the siteid as a filter when getting the best bets? And the question is, can you specifically ask for Best Bets for a given siteid?

native.history.js 404

$
0
0

I have two pages where the file https://dl.episerver.net/12.2.4/epi-util/native.history.js gives a 404 errror.

Does anyone else have the same problem?

native.history.js returns 404

$
0
0

Hi!

https://dl.episerver.net/12.2.4/epi-util/native.history.js returns 404 and adds ~200ms load time to each page.

Is this file removed? Should we update Episerver find or is there any other fix for this?


Best regards
Kevin

edit:
Just noticed this post - http://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2016/10/native.history.js-404/


You can lock this thread.


native.history.js 404

$
0
0

I have two pages where the file https://dl.episerver.net/12.2.4/epi-util/native.history.js gives a 404 errror.

Does anyone else have the same problem?

Crawler connector: ignore session id

$
0
0

I've set up a crawler connector in EPiServer Find which seems to create duplicates in the index. When I investigated I've found out that the URLs differ only by JSESSIONID in URL. For example:

http://partille.tromanpublik.se/viewPerson.jsf;jsessionid=823DB252BC63FFA19437786FE7740217?id=93

http://partille.tromanpublik.se/viewPerson.jsf;jsessionid=B602838BA33CA65D0E88B27D4C06E1A5?id=93

Not that the query string is the same and the links lead to the same page (can easily be tested in browser). I cannot find any way to configure the connector to ignore this jsessionid thing. Anyone did this before? Can Find filter them?

GetResult when some items are IContentData and some are not

$
0
0

Hey.

I've created a common interface, ISearchHit. It has a few custom filtering options as well as a few fields related to actually displaying the search hit. Some page types implement this interface, and also some ordinary C# objects that are indexed manually.

The problem is with Search<ISearchHit>().ApplyFilters().GetResult(). GetResult will throw exceptions when it tries to deserialize the hits that are also IContentData. This forum says you should use .GetContentResult to get around this problem. But ISearchHit isn't necessarily IContentData and isn't even compiled as such.

I've also attempted to use UnifiedSearch rather than the normal search, but the whole ISearchContent deal really isn't what I need. I already have a common interface I want to work with. Plus, using unified search gives other problems, such as OriginalObjectGetter begin <null> for my manually indexed objects.

What is the preferred way of doing this kind of search?

I use EPiServer 9 and EPiServer Find 12.2.4.

Content indexer conventions clarification?

$
0
0

Hi,

I recently bumped into a possible issue, can't really determin if this is by design or a bug so I thought I'd raise the question here.

I've written an indexing convention that is based on a boolean property on a specific page like this:

ContentIndexer.Instance.Conventions
              .ForInstancesOf<Page>()
              .ShouldIndex(x => !x.ExcludeFromSearch);

When adding a page with this property set to true it does not get indexed - everything is peachy.

However, when saving a page that previously had this property set to false the item in the index does not get removed nor updated with the new value.

Should indexing conventions not remove the item from the index if a property is updated that makes the item invalid?

Surely one would not have to empty the index and perform a complete reindexing for this to work?

Thanks!

Find Unified search stop working

$
0
0

we have had annoying problems with Find for few weeks now. At some point it seems that UnifiedSearch stops working and we get no results, while some other find searches still work. In error log we see this re-occuring:

 EPiServer.Find.Cms.CmsUnifiedSearchSetUp: IAttachmentHelper can not be initiated.

The problems seems to go away with IIS reset. Does anyone have any clue what could cause this? Our Episerver DLL:s are in version 9.10.0.0 and Find in 12.0.0.4448

Please use GetContentResult extension method for getting results with content types

$
0
0

Hello,

After upgrading to the latest version of EPiServer Find we get the error "Please use GetContentResult extension method for getting results with content types". The thing is, the type/types we are searching for are not content types. What changed in the new version?

/Peter

filter like string

$
0
0

I have a string array("Sweden","India","Australia"). I want to dispaly those page whose have the follwing anyone country in their tage page.In each page tag data present with coma seprated.

Page1(Hashtag:India,Pakistan,Srilanka)

Page2(Hashtag:Australia,Iran,Nepal)

Page3(Hashtag:Pakistan,Sweden)

Page4(Hashtag:Pakistan,nepal,Srilanka)

Output:

Page,Page2,Page3

Code:

.Instance.Search<ListablePage>()

.For(query)

.Filter(x=> x.Hashtag.In(new Lst<string>{"Sweden","India","Australia"}))

using IN i can not find data from coma separtaed tag. Is there any like searh for it like '%India%' ?


Looking up dl.episerver.net/...

$
0
0

Hi,

I've just upgraded a project to the latest version of EPiServer and Find and all pages take ages to load which looks like it's caused as it's trying to look up "dl.episerver.net/..." which I believe is related to Find. The site is on a dev VM which does not have internet access and can not have internet access and I won't be able to get anything opened up to allow the lookup of this.

Is there an 'offline' solution to either prevent this lookup or have the files it needs locally?

Thanks in advance,

Mark

What is required on closed production server to open?

$
0
0

Hi

the prod server is pretty "closed" and I need to open up for FIND.

Is it enough to open 

http://es-api01.episerver.com/xxx_key
 
which is IP 217.114.93.41

port 80

on a production server? or can it vary somehow?

/Fredrik

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

Show search result with Product and Variant both

$
0
0

Hi All, 

We have a requirement where the search will show both the products and its variants in the list. Is there any possibility to implement this in Episerver? Any help will be much appreciated. 

Distinct

$
0
0

Is there any way of searching for data using sql-like 'distinct' on a specific field?

Lets say I have data structured like this:

Product: Red shirt
Size: S
Code: ABC_001
Style: ABC

Product: Red shirt
Size: M
Code: ABC_001
Style: ABC

Product: Blue shirt
Size: S
Color: Blue
Style: ABC
Code: ABC_002

Product: Blue shirt
Size: L
Color: Blue
Style: ABC
Code: ABC_002

I want to retrieve products by "Code", but only get one per "Code" - in other words "SIze" is not relevant. 
How can I do that using a Find query?

Viewing all 6894 articles
Browse latest View live