Global search returns all entries for locations

Hi all, have started using the built-in FP_Event_Locations module, and am having a problem with the global search returning all entries regardless of the search term. Quick and advanced filter work fine however. I tried a few suggestions I found on google of setting a unified_search value, but this didn’t do anything. I just need to be able to search the name field.

Anyone possibly have a solution?

We are using version 7.9.4.

Hi,
in administration -> GLOBAL SEARCH you need to add the module in the left block “Enabled Modules”.

If you have ADVANCED OPENDISCOVERY activated you need to set correctly the scheduler and activate the jobs to “perform the lucene index” and “optimise aod index”. AOD use Lucene and needs indexes

If you don’t want AOD, disable it and global search start to work.

Hi Roberto,

I tried both of the above (the module was already in the list of enabled modules), neither made any difference. Haven’t been using AOD, don’t even know what it is. Is there anything else that I could look at? I’ve attached the results of a simple search, you can see it just returns everything for the Sites (was locations) module.

Hi,
the search should work only on name with like option on query.
You can try to increase the log level to “debug” in system setting. With “debug” Suitecrm print all the query in the suitecrm.log file, so we can see what happen and if there are errors

Ok so checked the debug log, the search isn’t trying to filter for this query. This is the result of a search for the word “STA”

10/04/17 11:19:15 [12688][de54e5a0-7721-d380-1c3a-59b77054f09a][DEBUG] Limit Query: SELECT fp_event_locations.id ,fp_event_locations_cstm.contactnumber_c,fp_event_locations_cstm.contactperson_c,fp_event_locations_cstm.status_c, fp_event_locations.name , fp_event_locations.assigned_user_id FROM fp_event_locations LEFT JOIN fp_event_locations_cstm ON fp_event_locations.id = fp_event_locations_cstm.id_c where fp_event_locations.deleted=0 ORDER BY fp_event_locations.date_entered DESC Start: 0 count: 11

10/04/17 11:19:15 [12688][de54e5a0-7721-d380-1c3a-59b77054f09a][INFO] Query: SELECT fp_event_locations.id ,fp_event_locations_cstm.contactnumber_c,fp_event_locations_cstm.contactperson_c,fp_event_locations_cstm.status_c, fp_event_locations.name , fp_event_locations.assigned_user_id FROM fp_event_locations LEFT JOIN fp_event_locations_cstm ON fp_event_locations.id = fp_event_locations_cstm.id_c where fp_event_locations.deleted=0 ORDER BY fp_event_locations.date_entered DESC LIMIT 0,11

10/04/17 11:19:15 [12688][de54e5a0-7721-d380-1c3a-59b77054f09a][INFO] Query Execution Time:0
10/04/17 11:19:15 [12688][de54e5a0-7721-d380-1c3a-59b77054f09a][DEBUG] Hook called: FP_Event_Locations::process_record

10/04/17 11:19:15 [12688][de54e5a0-7721-d380-1c3a-59b77054f09a][INFO] Query: SELECT count(*) c FROM fp_event_locations LEFT JOIN fp_event_locations_cstm ON fp_event_locations.id = fp_event_locations_cstm.id_c where fp_event_locations.deleted=0

I then re-ran the same search with a different module included and the search term is definitely there;

10/04/17 11:22:09 [12688][de54e5a0-7721-d380-1c3a-59b77054f09a][DEBUG] Limit Query: SELECT documents.id ,documents_cstm.docnum_c,documents_cstm.doctype_c,documents_cstm.type_c, documents.document_revision_id , documents.doc_id , documents.doc_type , documents.doc_url , documents.active_date , documents.exp_date , documents.status_id , documents.document_name , documents.assigned_user_id FROM documents LEFT JOIN documents_cstm ON documents.id = documents_cstm.id_c where (((documents.document_name like ‘%STA%’))) AND documents.deleted=0 ORDER BY documents.date_entered DESC Start: 0 count: 11

Now we know the problem. The crm do not crate conditions of search in the query.
Why?

I had try to do the same things in my installation of SuiteCRM 7.9.4 and it work right, so probabbly is not a bug.
Have you see if there are some errors, also in error.log of Apache server?!

Hi,
You may like to review this product. Let me know if any questions.

https://store.outrightcrm.com/product/enhanced-global-search/