Bug 437547

Summary: Query Parse error for package search when sat sync is running
Product: Red Hat Satellite 5 Reporter: Partha Aji <paji>
Component: WebUIAssignee: John Matthews <jmatthew>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: low Docs Contact:
Priority: low    
Version: 520CC: gkhachik, jmatthew, tao, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://test10-64.rhndev.redhat.com/rhn/channels/software/Search.do
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-10 19:31:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 457073    

Description Partha Aji 2008-03-14 20:23:00 UTC
Description of problem:
Basically after you install a satellite, while sat sync is running, you goto 
https://<host>/rhn/channels/software/Search.do and
enter any search string you get a wierd error
"   
 * Could not parse query '<search_string>'."
"
Its just that the file has not been indexed yet, the actual error has nothing to
do with query parsing..


Version-Release number of selected component (if applicable): 5.1


How reproducible: Always


Steps to Reproduce:
1. Install satellite
2. Do not start the sat sync yet...
3. Logon to the UI
4. click on channels
5. click on Package search
6. Enter search string "perl" and click on search

  
Actual results:
You see error message ->   
  * Could not parse query 'perl'.

Expected results:
Some sort of message saying the search indexing is probably going on right now.
You might want to wait before starting the search.. In fact there could be a
warning message as soon as you click on the Package Search tab saying "Note:
Search Indexes have not be created, please try your search after a few minutes
or check with your system adminitstrator."


Additional info:

Comment 1 John Matthews 2009-02-19 14:26:31 UTC
Fixed in this commit

http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=7799d4a568710601c0284c1f67a1c5b8b033f742



Added a message that will display index files are missing instead of 'could not parse query'.

What was happening in this issue is no packages existed in the db, so there was nothing indexed, search-server had no index files to search and we weren't checking the exception type in the webui.


Note:  We aren't adding a message to state if indexing is in progress or not.  That's a more difficult problem to solve.  In particular solving it for system search would be tricky.  System search potentially searches several indexes.  It's possible a given query will succeed and find data, while something like snapshots maybe won't find index files.  Essentially, the answer of data being available or not is dependent on what query the user executes.  I'd like to request we file a separate bz if this functionality is desired.

Comment 12 Brandon Perkins 2009-09-10 19:31:21 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html