Hello Johannes,

I applied your both patches as:
 0d0ee6715d156178627055961d932c5e6f309b83
 063c0a9838a6b306bf4ff18b9db24022300dc433

Thank you!
--
Tomas Lestach
Red Hat Satellite Engineering, Red Hat


----- Original Message -----
> Hey,
> 
> attached is a patch to fix the advanced search for custom info values. The
> indexing seems to work
> fine, it's only the removal of old index records that is failing. And AFAICS
> it is failing for
> custom info values only while it seems to work fine for e.g. system
> name/description.
> 
> The issue is when a custom value is changed and you do a search for the old
> value: you will still
> get the respective system as a result. This should not be the case of course,
> try to reproduce it!
> Reason seems to be that certain methods in lucene (or at least that old
> version that is used) don't
> really work as expected with the combined identifier that we use for custom
> info values. Especially
> reader.docFreq(term) always returns 0 in IndexManager.addUniqueToIndex(), for
> any reason. Therefore
> we will never remove any old index files when trying to add one uniquely. I
> tried several fixes,
> but the only thing that I found to be working was overwriting getId() to
> return the concatenated
> IDs as a long, please see my patch.
> 
> The second patch is related to the same feature. It prevents an NPE when
> trying to delete a custom
> info value that has not been persisted yet. Try it out by creating a new
> custom key value and
> before clicking on "Update Key", do "delete value" above.
> 
> Regards,
> Johannes
> 
> --
> SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
> 
> _______________________________________________
> Spacewalk-devel mailing list
> Spacewalk-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-devel

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to