cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Is Solr indexing thread safe?

Former Member
0 Likes
1,716

Hi All

I was just wondering if Solr indexing operation within Hybris is thread safe.

In a project I'm working we are indexing product characteristics which is a custom item type created in the data model. What happens sometimes, 1 out of 7 full index runs, is that wrong characteristic value is assigned to one of the characteristics in Solr. For example, we have Colour, and Size characteristics. During a full index, the value of Size would be assigned to Colour. But in the next full index it would be fixed. These characteristics are being used as facets.

So I'm wondering if the multi-threaded indexing process is causing this behaviour occasionally. Or if there could be another explanation.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

So the answers given are correct. Solr indexing is thread safe. However, we had some services that we were using in a very complicated value provider and those services were not thread safe.

Very important to keep that in mind. All custom services bring used in value providers should be thread safe.

Answers (2)

Answers (2)

Former Member
0 Likes

If you are using out of box Defaultindexer Solr indexing is tread safe does't matter what type you are using to index. we do not required to make value provider tread safe because they just populating data.

Former Member
0 Likes

solr indexing using multiple threads is thread safe. Solr picks up data from product model, check to see if your product feeds pushed from third party systems have correct data.

also check your value providers to see from there the product attribute is getting picked from BaseProduct, ColourVariant or SizeVariant and if correct data is being sent in the product feed for that product level.

Former Member
0 Likes

We aren’t using the variants. We just have a one to many Product to Characteristic relationship. In our custom value provider we are loading using DAO by passing in the product model