Developer forum

Forum » Development » Source code from Indexing Everything webinar

Source code from Indexing Everything webinar

Jeppe Eriksson Agger
Reply

As promised during the webinar Indexing Everything on July 1st 2015, here is the link to the source code that I showed.

There are two implementations in the solution. One shows how to create an IIndexBuilder and the other shows how to implement an IIndexSchemaExtender.

It's all available on GitHub here: https://github.com/dynamicweb/dwtc15

- Jeppe


Replies

 
Davor Zlotrg
Reply

Thanks Jeppe.

Kind regards,
Amir

 
Rasmus Andersen
Reply

Hi Jeppe, 

I have a working index (tested using Luke). 
I missed where to activate the module "Query Sandbox" in version 8.6.1.x, can you elaborate further on this?

Thank you in advance :)

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
This post has been marked as an answer

Hi Rasmus,

You need to activate the module manually in Management Center -> Developer -> Modules. Click New module in the toolbar; enter Query sandbox in the Name field and QuerySandbox in the System name field. Make sure that both Enabled and Paragraph module are checked.

Now, you can use the sandbox as a paragraph module.

Please note that you should probably remove the module before upgrading to 8.7 when that version comes out, as it contains a newer version of this module with a different name.

- Jeppe

Votes for this answer: 1
 
Rasmus Andersen
Reply

I will give it a shot, hopefully I'll have time this week.

Thank you :)

 
Rasmus Andersen
Reply

Jeppe I noticed that my searches are case sensitive, I would like them to be case insensitive. 
Can I set the Lucene analyzer somewhere?

Thanks 

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
This post has been marked as an answer

There are a few ways to handle that issue.

The best way -- I think -- is to check the "Analyzed" checkbox on the field definition in the index schema. Doing this will set the Tokenized flags in Lucene and will use the StandardAnalyzer to tokenize the value. In Dynamicweb 8.7, we'll be adding the option of specifying a separate analyzer for each field. This allows for more granular control over tokenization.

You can also implement a IIndexBuilderExtender and convert the values to lowercase. You would also have to convert all search inputs to lowercase for that to work. I do not recommend this solution as it requires a lot of maintenance on your part.

One thing to note though, creating an IIndexBuilderExtender and adding a new lowercase entry can be good for sorting if you want lexical sorting instead of ordinal sorting. You can create a new thread if you want to know more about this.

- Jeppe

Votes for this answer: 1
 
Rasmus Andersen
Reply

[This was edited a second after Jepps reply]

Thank you, it seems like my schema needed a rebuild. The Analyzed field must have been false in my IIndexSchemaExtender at some point  :)

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Try setting Stored to false.

 

You must be logged in to post in the forum