indexer defaults --keep-attrs to true ?

Hi,

I am running an indexing job with the following command line:

sudo -H -u manticore /usr/bin/indexer --verbose --rotate --config /etc/manticoresearch/manticore.conf myHB_index1

This is the initial output:

Manticore 3.5.3 0709fc5@201119 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2020, Manticore Software LTD (http://manticoresearch.com)

using config file ‘/etc/manticoresearch/manticore.conf’…
indexing index ‘myHB_index1’…
WARNING: schemas are different (attribute count mismatch (me=product_data, in=/var/lib/manticore/myHB_index1, myattrs=27, inattrs=26)); ignoring --keep-attrs

The difference in attribute numbers makes sense as I had removed one.

I was a bit surprised by this message as I did not set --keep-attrs on the command line but thought maybe this is just a warning that such a command-line argument would be ignored.

Just to be sure I had a look at the source code: this message seems to be defined in sphinx.cpp in the Init function, the first lines of code of the Init function are:

if ( sKeepAttrs.IsEmpty() && !dKeepAttrs.GetLength() )
return false;

Now I wonder why the code got to this Warning message as it should really return before as sKeepAttrs should really be empty.

Can anyone look at the code and let me know what they think ?

As I am having some problems with a possible mis-alignment between documents and attributes this seemed like a possible cause (keeping old attribute values when in fact these have changed so new documents would be linked to old attributes that happen to have the same id).

I hope this is clear, feel free to ask if not and I will try to provide more details.

Thanks
Roberto

Hi. This is a known issue in the dev version. It will be fixed and the fix will be included into the upcoming release 3.5.4. For now you can remove --verbose from the command as it will be deprecated in the release (as it doesn’t change anything in the output actually), it should solve the problem.

should be fixed at master branch and dev repo package