Jump to content

FULLTEXT Boolean mode - wildcards - Need Urgent Help


Recommended Posts

Hello all..

I am using a FULLTEXT search on my database (yes, I know it is slow..) , creating a user defined filters , and later plotting a graph..

A user can choose between country, product, warehouse, customer, and any boolean combination of the above to plot a statistics graph.

 

SELECT client_name,count(client_name) as unit,sum(pic_sale_price) as gross FROM mgminibar_reports_view where MATCH (client_name) AGAINST ('Client_name' IN BOOLEAN MODE) group by client_name

 

example:

plot graph for Germany , all Warehouses (MINUS) WarehouseX + US (minus) Florida - CustomerY..

 

It works ok, but I have one problem...

I  can not find the way to make (Select All) .

(Or in other words, Using a wildcard without appending a string to it )

 

For example , Germany, ALL Clients,

 

or

 

All COUNTRIES , ALL PRODUCTS.

 

I could not find anything in the reference ..

 

in the code here below :

 

SELECT client_name,count(client_name) as unit,sum(pic_sale_price) as gross FROM mgminibar_reports_view where MATCH (client_name) AGAINST ('Client_name' IN BOOLEAN MODE) group by client_name

 

what would be the operator to Select ALL clients ??

 

I tried

 

SELECT client_name,count(client_name) as unit,sum(pic_sale_price) as gross FROM mgminibar_reports_view where MATCH (client_name) AGAINST ('+*' IN BOOLEAN MODE) group by client_name

 

But did not work...

 

How to use a wildcard WITHOUT appending it to a search term (ALL) ??

 

 

 

 

Thanks for replying , I was starting to think no one see this post !

 

I don't follow... why use a search if your search would simply find everything?

 

well, this is a part of a system that is generating graphs for an automated distributed warehouses chain

I have ONE graph, that a user can change parameters.

the parameters are : Country , City , Supplier ,product , Client, Warehouse.

the search is to populate the array to generate the graph.

 

So the user can generate a graph for example

 

Germany (-) berlin (-) supplierX (+) productY

 

This will generate a graph from germany, EXCLUDING teh city of berlin , EXCLUDING supplier X and INCLUDING ONLY product Y

 

The problem is :

how to make , with the same feature ,for example :

 

ALL COUNTRIES (-) productX (-)Supplier Y (+) ALL warehouses

 

I hope it is more clear ....

 

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.