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

Best practices for indexing commerce content

$
0
0

Hi 

I am a newbie to EPiServer Find, I see two different way of indexing the contents

1. EPiServer Find Commerce (OOTB)

2. Indexing the POCO instead of CatalogContent (e.g. Commerce StarterKit use FindProduct poco class)

What's the pros and cons for each of these methods? I want to get the things right at the first place.  

One cons of using the POCO is OOTB built-in methods are no longer applicable on POCO. E.g. FilterOnCurrentMethod

http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Commerce/9/Search/find-integration/filtering-catalog-content/


How to filter products by catalog id?

$
0
0

Hi

Here is my catalog structure

Main Catalog

  Category A

    Category B

      Products

Below is my query, I want to filter all products under Category A, however I get empty results. Can someone tell me if the query has any problem?

var products = SearchClient.Instance.Search<ProductContent>()
.FilterOnCurrentMarket()
.Filter(x => (_contentLoader.Get<IContent>(x.ParentLink).ParentLink.ID.Match(Category A.ID)))
.GetContentResult();



SearchClient Unauthorized errror

$
0
0

Hi,

I have Unauthorized service exception whe executing SearchClient.Instance.UnifiedSearchFor(Query).GetResult();.

Does anyone knows what is the problem?

Thanks

Can't get results.

$
0
0

Hi,

I'm using EpiServer 8.11. and the project has Find installed.

When I got to the Overview tab it tells me there are 20 documents indexed. This is "For All Websites" in "All languages" but when I set the tab to my specific website name this drops to 0.

Needless to say but when I try and do a basic search in my code I get no results back.

How do I fix this so that find indexes the results for my site?

thanks,

Stephen.

Using two FIND index with one database

$
0
0

Hi!

I was wondering if anyone has any experience using two EPIServer FIND index towards one EPIServer database? The setup consist of two loadbalanced webservers running the website. Each website is using the same database and the same FIND index. However as we are having a high load on the PIServer FIND index, i was wondering if it is possible to use two FIND index instead, one for each webserver/website to spread the load towards FIND on two index. Any issues that we might run into if we try it?

Thanks

Magnus

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);
});

    

Cant select item in search result (edit mode)

$
0
0

When im in edit mode and editing a page reference property I press the little button"..." next to the textbox and the "Select page"-dialog is opened. I can seach for pages, that works well, but I cant select a page from the search result - nothing happens. If i disable the EPiServer Find Search Provider in Admin mode (Admin -> Tool Settings -> Search Providers), I can use the default EPiServer search and select pages. But of course I want to be able to use the EPiServer Find search.. When I search the pagetree everything works as expected with EPiServer Find, im able to select pages from search result. Is this a bug?

Using infiel in combination with nested queries

$
0
0
Hi!
Should it be possible to use infield together with nested queries? For example:
public class Team
{ public Team(string name) {  TeamName = name;  Players = new List<Player>(); } public string TeamName { get; set; } public List<Player> Players { get; set; }
} 
public class Player
{  public string FirstName { get; set; }  public string LastName { get; set; }  public int Salary { get; set; }
}
result = client.Search<Team>() .InField(FirstName) .Filter(x => x.Players, p => p.FirstName.Match("Cristiano") &    p.LastName.Match("Ronaldo")) .GetResult();
And in that case what is the syntax for the InField?
regards
Magnus

EPiServer Find facet management and product/variant search

$
0
0

I'm starting to implement Find on a QuickSilver solution replacing the Lucene-based implementation. What I'm a bit puzzled about is how to implement a flexible way of handling facets/filters.

In the Lucene implementation all is controlled by the Mediachase.Search.Filters.config file which gives a quite good flexible way of handling which facets/filters should be available.

In Find it seems I must implement all facet logic in code making it not so flexible or am I missing something?

The structure for facets is to use the TermsFacetFor(x => x.Property) and since I need to provide that strongly typed information in the builup of the query there is no simple way of handling this, like say in a config-file or appSettings. A good solution would have been to let administrators have a way of controlling the facets and filters but since it seems that all needs to be coded there is no such way?

Another thing that comes apparent in how the customer we are working for wants the search functionality to be is that available filters and facets is based on the variants but the searchresult is presented as products.

The Quicksilver implementation for this is that the products have fields for color, sizes that represent their variants different settings. Is this the way to solve this or is there another way of filtering variants but presenting products?

Any suggestions on how to handle those scenarios?

Best Bets error

$
0
0

Hello Forum,

I am new to Episerver and I have a question regarding an error I get when I am trying to point a "Best Bet" to a product.

Pointing to a "Local" or "External" target works fine.

This is the error. I am looking for some hints about what to do. 

Best Regards
Lasse

Episerver Best Bets error

 

Nested queries: Filter number of nested objects returned from FIND

$
0
0

Hi!

I was wondering if it possible to filter the number of nested objects that FIND returns in a filtered nested query? Consider the following:

public class Team 
{
 public Team(string name)
 { 
  TeamName = name; 
  Players = new List<Player>();
 }
 public string TeamName { get; set; }
 public List<Player> Players { get; set; }
}
public class Player
{
  public string FirstName { get; set; }
  public string LastName { get; set; }
  public int Salary { get; set; }
}
result = client.Search<Team>()
 .Filter(x => x.Players, p => p.FirstName.Match("player1") & 
    p.LastName.Match("Ronaldo"))
 .GetResult();

Data

Team 1 contains player1 (name = player1)and player2 (name = player2)
Team 2 contains player3  (name = player3) and player4 (name = player4) 

I would like to achive a search result from find that contains
Team1 with Players only containing the object player1. Is it possible? Now it seems like FIND returns Team 1 with both player1 and player2.

/Magnus 

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 )<---



The Find user interface is currently not available, please try again later.

$
0
0

Just started experimenting with Find, I followed the steps to create a project with Find. When I login to episerver, I see the Find option in the top menu, and underneath the options:

Manage Configure Overview

But all three lead to:

The Find user interface is currently not available, please try again later.

[Try again button]

Trying again changes nothing.

Find version is 9.6.0.3185.  What have I done wrong?

Grasping right hand truncation (Girig högertrunkering) on all fields

$
0
0

We are converting from SiteSeeker to EPiServer Find for a customer and I notised that they are using something in SiteSeeker called (Girig högertrunkering) witch means that it instead of searching only for [Hell] it does a [Hell] OR [Hell*] -search. Read more here :http://www.siteseeker.se/sv/kunskapsdatabas/faq/sokning/ordledsuppdelning/

I have looked into the solutions for achiving this in EPiServer Find and in all of them it's only for one property, I want to do it for all properties and for information in files and so on.

Is there even possible to do that in EPiServer Find?

 

 

How to create non strongly typed version of TermsFacetForWordsIn method?

$
0
0

The TermsFacetsFor has non strongly typed version, however I need case-insensitive for my term facets.

Thanks,

Vincent


How to create non strongly typed version of TermsFacetForWordsIn method?

$
0
0

Hi

The TermsFacetsFor has non strongly typed version, however I need case-insensitive for my term facets.

Thanks,

Vincent

Implemeting EPI.FInd.cms from Scratch

$
0
0

Hi All,

I want to implement EPI.Find.Cms from scratch in one of my POC.I know EPI.FInd is implemented there in Alloy website.I tried to replicate that in my POC application but I am getting lost into it and resulting with so many errors.I got succeded to make it work in alloy Wensite at my local.

I want to implement it from scratch and I don't want to get into complex coding of Alloy.Please help me to achieve this.I want to learn the concept of EPI.FInd ,If anyone is having some sample code or URL Please provide me.

Loader exception in EPiServer.Find.UnifiedSearch.UnifiedSearchRegistryExtensions.ForInstanceOf(IUnifiedSearchRegistry registry)

$
0
0

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

SearchClient.Instance.Conventions.UnifiedSearchRegistry.ForInstanceOf<PageData>()

When I inspect the LoaderExceptions property I in the current case see that it can't find Microsoft.IdentityModel.Clients.ActiveDirectory 2.21.

In another project I had the same issue with a version of Microsoft.AspNet.WebApi.Cors and I have a couple of reports from workmates also running into the same error with different references.

Are we doing something run with nuget or is there something in Epis libraries that needs to be more forgiving?

Episerver find only indexes .pdf metatags, not the content

$
0
0

Hi,

When I look into the indexed content in Find -> Overview - Explore I can see that Find indexes the metadata of the files, but not the content inside of them. Why don't it index the content of the .pdf files? (Use UnifiesSearchFor and can't get hits on the documents when searching with queries form its content)

Thanks.

AsHighlighted returning empty instead of fragments.

$
0
0

I have a search page set up using Find (v11) w/ EPiServer 9.6.  For the most part, things are working as expected.  When we search, we project the different result types and one of the fields we select is the SearchText.AsHighlighted(), like follows:

search.Search<SitePageData>(Language.English, x => x.For(s)
		.FilterForVisitor()
		.Select(p => new SiteContentResult {
			Link = p.ContentLink,
			Title = p.Title,
			Excerpt = p.SearchText().AsHighlighted(
				new HighlightSpec {
					FragmentSize = 100,
					NumberOfFragments = 3
				})
		})


In general, this works as expected, however for some queries, we get back results, but no fragments.  I read in the documentation here (http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/11/DotNET-Client-API/Searching/Highlightning/) the following:

If there are no highlights for the requested field, the projected property is an empty string. To ensure that the property value is not empty, use an if statement.

Which seems to be what I am seeing.  However, it isn't clear (a) why there would not be highlighting when there are hits in the field, and (b) if there is any way to force the highlighting to occur.  

Looking at the documents in the index under the Find -> Overview -> Explore tab, I can see that the text being searched for does exist in the SearchText field (and the document wouldn't have been found in the first place if that wasn't the case).

Can someone explain why I'm seeing this result, and if there is a way to adjust the behavior so that I consistently get highlighted results?

Thanks!

Viewing all 6894 articles
Browse latest View live