You are here:  » specific results

Support Forum



specific results

Submitted by Paul1107 on Fri, 2009-04-24 07:28 in

Hi David,

Thought I saw a thread relating to this recently, but can't find it.

If I'm trying to create results using the description of a product, can that be done?

So if I want to show a query result from all the feeds of all blue widgets, blue widgets would be the search parameter and when "blue" and "widgets" appear in any description it would feature in the query results?

On that same assumption could you do it by merchant:?

Regards

Paul

Submitted by support on Fri, 2009-04-24 07:39

Hi Paul,

Did you mean this thread:

http://www.pricetapestry.com/node/1224

(including description field in search)

The same principal can be extented to include merchant as well if you wish. You'd need to build the index as follows:

CREATE FULLTEXT INDEX namedescriptionmerchant ON products (name,description,merchant);

...and similarly the replacement for:

MATCH description

...would be:

MATCH (name,description,merchant)

Cheers,
David.

Submitted by Paul1107 on Fri, 2009-04-24 07:52

Thanks David,

Just so I'm sure that I'm NOT mis-leading you here, is this the same process if I were setting the queries in the calling code, not user search queries so for example.

if (!$_GET["q"] && !$_GET["r"] && !$_GET["merchant"])
{
$_GET["q"] = "product:blue widgets:";
$_GET["sort"] = "priceAsc";
$_GET["maxPrice"] = "1000";
$_GET["minPrice"] = "20";
}
require($external_path."external.php");
?>

I don't use the search box on my site

Thanks again

Paul

Submitted by support on Fri, 2009-04-24 07:56

Hi Paul,

No changes required there, but the query would just be:

$_GET["q"] = "blue widgets";

(product: isn't a support operator as that's the default)

After the above mod (remember to make the changes to external.php as well as search.php!) it would then search for "blue widgets" in the product name, description and merchant fields...

Cheers,
David.

Submitted by Paul1107 on Fri, 2009-04-24 08:01

thanks David