on 12-21-2006 5:11 PM
Which APIs (options) are available to sort the product search results into more relevant sequence.
We want that the results should not be ordered by SKU # but by the relevant search string.
Eg. when searching for SKU # 65-100 the current results show 65-100 much later and other SKUs containing the string 65-100 (eg. 300-65-100, are shown first).
Thanks
Here is one suggestion for achieving what you want:
Do 2 searches - the first for SKU's starting with "65-100" (using the FreeFormParameter.PrefixSearchType), and the second search using the FreeFormParameter.SubstringSearchType parameter.
Now display the results of the searches, one after the other, ensuring not to display the same result twice.
Walter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vipul:
You can use the signature for retrieve the result set, as explained in the API reference:
GetResultSet Method
Returns an A2iResultSet based on limiting search parameters.
Syntax
CatalogData.GetResultSet(Search : Search,
ResultSetDefinition : ResultSetDefiniton, SortField :
String, SortAscending : boolean, Page : long) :
A2iResultSet
Argument Description
Search Search object containing the search parameters
ResultSetDefinition Name of ResultSetDefinition object (see
ResultSetDefinition class on page 182)
<b>SortField </b> Field to sort on or null
SortAscending true sorts limited records in ascending order
Page Indicates page (beginning with 0) to retrieve if a page
size is set in ResultSetDefinition object
Return Value A2iResultSet object
And the following example:
import a2i.generated.*;
import a2i.common.*;
import a2i.search.*;
Search search = new Search("Products");
ResultSetDefinition rsd = new
ResultSetDefinition("Products");
rsd.AddField("Part Number");
A2iResultSet rs = catalogData.GetResultSet(search, rsd,
"Part Number", true, 0);
System.out.println(rs.GetRecordCount());
I hope this helps
Greetings
Alejandro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.