Description of problem: If I do a search in the web console or via the API it doesn't find the VM. Despite the fact that I have a VM named idempiere-dev. If I search for dev it finds it and any other Vm with dev in the name. Version-Release number of selected component (if applicable): 4.0.6.3 How reproducible: 100% Steps to Reproduce: 1. Create a VM named idempiere 2. Search for idempiere Actual results: Does not find idempiere Expected results: Finds idempiere Additional info: We are using a 4.0.6.3 Hosted Engine environment and haven't tested any other version because we don't have one to test. The log file shows: 2017-03-13 11:27:33,268 INFO [org.ovirt.engine.core.bll.SearchQuery] (default task-19) [] ResourceManager::searchBusinessObjects - erroneous search text - ''Vms: idempiere''
Is this specific to the term 'idempiere' or also to other prefixes? For example if you have VM named 'myvm-dev' are you able to search for it using "Vms: myvm"? Also could you please attach server.log and engine.log from your setup?
OK, found the issue, we show an error while searching for VMs which name starts with 'id' prefix
(In reply to Martin Perina from comment #2) > OK, found the issue, we show an error while searching for VMs which name > starts with 'id' prefix And also any other keyword. Tried with 'ip'.
Moving to 4.2 until we investigate how complex this it to fix
So after investigation fixing this issue would require too complex changes in search backend code, so moving to ovirt-future for now. But there's a fully functional workaround for this feature: Vms:name=idempiere The above will work as expected without any side effects.
Vms:name=idempiere no longer works in 4.1.6. It returns the same as VMsidempiere, no results found.
(In reply to Logan Kuhn from comment #9) > Vms:name=idempiere no longer works in 4.1.6. It returns the same as > VMsidempiere, no results found. I've just tested on 4.1.6.1 that all of the below expressions works as expected: Vms: name=idempiere - returning only VM with name 'idempiere' Vms: name=id* - returning all VMs starting with prefix 'id' (case insensitive) Vms: idempiere - returns empty list because id is a predefined keyword Vms: id* - returns empty list because id is a predefined keyword
Yep, that works fine.... i wonder what changed in our environment in the last week, because i tried all those things and they failed. Regardless it's working with all the examples you provided where it should work, it also works with the one I reported as failing if I add a star (*) or type the full name.
*** Bug 1513580 has been marked as a duplicate of this bug. ***
*** Bug 1581570 has been marked as a duplicate of this bug. ***
(In reply to Martin Perina from comment #5) > So after investigation fixing this issue would require too complex changes What kind of fix did you think? IMO, the fix should be that using keyword should be 'keyword=' or 'keyword:' and any other search will not attempt to use a keyword, Does such fix require too complex changes? > in search backend code, so moving to ovirt-future for now. > > But there's a fully functional workaround for this feature: > > Vms:name=idempiere > > The above will work as expected without any side effects.
(In reply to Beni Pelled from comment #14) > (In reply to Martin Perina from comment #5) > > So after investigation fixing this issue would require too complex changes > What kind of fix did you think? > > IMO, the fix should be that using keyword should be 'keyword=' or 'keyword:' > and any other search will not attempt to use a keyword, > > Does such fix require too complex changes? Unfortunately yes, because currently parsing is performed by characters and it determines keywors only from previous and current character without looking at following characters. So fixing that would require to completely rewrite parsing part of SearchEngine which is quite big and dangerous task. So due to resource limitation moved to future
According to Comment 10 you can search for VM names starting with predefined keyword if you use name identifier: Vms: name=idempiere In the above example id is predefined keyword, list of all keywords is provided in Comment 8. If we would like to fix the issue with search VM names without name identified: Vms: idempiere then we would need to completely rewrite search engine code and this is very resource consuming operation with great danger of creating additional errors. Because searching using name identifier is fully supported and works as expected, I'm closing this bug.