Developer forum

Forum » Development » New indexing
Anders Ebdrup
Reply

Hi DW,

 

I have started working on the new index and have some questions:

  1. How can I see the executed "lucene"-query, which was possible by adding dbstat=true in the former index?
  2. Is the index always online even when the indexing process is going on? Or how is the switching done like the old one using the "index" and "backup" folder
  3. How can I add some custom information to a field in the product index, which was done by using the "ProductIndexEntrySurrogate". Say e.g. that I would like to add some calculated values to the "summary" field for making these searchable?
  4. How do I search in a product's the relateds group names?
  5. How do I structure my facets for displaying subgroups with matching products?
  6. How do I start indexing of the new indexes after a product import?
  7. Will it be possible to translate the facet groups in the administration?

Thank you very much.

 

Best regards, Anders


Replies

 
Nicolai Høeg Pedersen
Reply

@1: Currently not, coming up in a later release though.

@2: If there are more than one instance, it will first build the inactive, switch to that, and then build the second one. If there is only one instance, it will be down when building.

@3: The only way currently, is to create you own ProductIndexBuilder - we will consider making the one we provide extendable. You can also add the calculated data on your product instead - so do it during the import adding it to a custom field and index there. Also on a custom field, run something that will calculate the value, and add it to the database record.

@4: It has been added to the 8.7 branch that each product document in the index contains an array of group names and parent group names.

@5: In 8.7 you get the group heirarchy on the product document. You can use that to give you context of where you are in the tree.

@6: Has been made for 8.7, TFS#16779

@7: No - repositories are not Ecommerce specific - and it makes no sense to make Ecommerce languages in repositories and facets. You can, however, use the @Translate tag in your Razor templates and get the group names translated.

The things above that has been made for 8.7, we can merge it to 8.6.1 branch if needed. Let us know.

BR Nicolai

 
Anders Ebdrup
Reply

Hi Nicolai,

 

Thanks for your answer, but due to our thight deadline we will stick to the current index for this project.

I am looking forward really to try out the new index in 8.7! :-)

 

Beste regards, Anders

 
Nicolai Høeg Pedersen
Reply

Please don't!

BR Nicolai...

 
Anders Ebdrup
Reply

All right, then please start merging :-)

 
Nicolai Høeg Pedersen
Reply

Right on it! Will make a 8.6.1.* release this week.

 
Nicolai Høeg Pedersen
Reply

Hi Anders

TFS#16779 and TFS#17386 have been merged to 8.6.1 and will be released shortly.

16779 gives you a possibility to start an indexing job from an import using "RepositoriesIndexUpdate" (Instead of "ProductIndexUpdate").

17386 gives you 2 new fields on the product source and hence the lucene document. GroupNames which is an array of names of groups the product is member of, and ParentGroupNames which is an array of the paths' to the root of a product.

Let me know when you get startet - and if you need more information or help on the project.

BR Nicolai

 
Lars Larsen
Reply

Hi Nicolai

I am using DW v8.6.1.10 where do I find the "RepositoriesIndexUpdate" option?

 
Nicolai Høeg Pedersen
Reply

Hi Lars

On your import job, destination settings mark which indexes to run after import. See attachment

Capture.JPG
 
Anders Ebdrup
Reply

Is it the right screen dump, Nicolai? :-)

 
Nicolai Høeg Pedersen
Reply

Doh! :-).

Have a LOT of screen dumps! Trying again...

Capture.PNG
 
Anders Ebdrup
Reply

Hi Nicolai,

 

I have thought a bit about @3 in the original post for extending the data, and I think the best approach will be to use the standard productindexer and not write our own...

By using a calculated field then I will need these steps:

  1. Import products
  2. Calculate custom product fields
  3. Index products

How will I trigger this sequence when importing products?

 

Best regrads, Anders

 
Jonas Krarup Dam
Reply

Hi anders.

A possible solution, starting from 8.7, is to use our improved scripting functionality. I include the implementation specifiation below, as we haven't created any documentation for this (unreleased functionality) yet.

Basically, this should make it possible to implement calculated fields as part of the import, without having to create your own custom Data Integration provider from scratch.

As long as you calculate your values and place the results in regular Product fields, they will be indexed along with everything else


/Jonas


Improved scripting spec:
on field level, Use @Code(..) format, as used in Items and smart searches (see http://manual.dynamicweb-cms.com/Default.aspx?ID=7592#31782) - this needs to be implemented in all providers (but it's the same code, so refactor so that it is only found in the base class, and call it there)
 
 
on table level, add the option to run input rows through a "Script".
add a DataIntegrationTableScript class with one overridable method called ScriptRow(Dictionary<string, object> input) Dictionary<string, object> Output
 
and one method called "ScriptingName" which returns a string with the name to show in the gui.
 
in the GUI add a "scripting" icon (same as on columns). this should open a popup, where we can select which scripting class to use for that table.
 
In each DestinationWriter, add the code to check if any scriptClass is selected for the current table mapping, and if it is, run the  input through that class before sending it to the destinationWriter.

 
Anders Ebdrup
Reply

Hi Jonas,

 

We have some complex calculations to make in our ProductSurrogate, which I think is not in scope for the scripting part. So we will need some feature to extend the product fields being indexed.

 

I can send you some of our current indexing surrogates?

 

Best regards, Anders

 
Jonas Krarup Dam
Reply

Hi Anders,

I'm not an expert on the new index stuff, but feel free to send it to me, and if it doesn't make sense to me, I'll find someone to ask :-)

 

/Jonas

 

You must be logged in to post in the forum