on ‎2019 Jul 27 7:59 AM
final Map params = new HashMap();
params.put("warehousecode", warehousemodel.getCode());
params.put("version", version);
params.put("catalog", catalog);
final FlexibleSearchQuery searchQuery = new FlexibleSearchQuery(
config.getConfiguration().getString("query", ""), params);
final List resultClassList = new ArrayList<Class>();
resultClassList.add(String.class);
resultClassList.add(String.class);
resultClassList.add(Integer.class);
resultClassList.add(Integer.class);
resultClassList.add(Integer.class);
resultClassList.add(Integer.class);
resultClassList.add(String.class);
searchQuery.setResultClassList(resultClassList);
final SearchResult<List> result = flexibleSearchService.search(searchQuery);
if (result.getTotalCount() > 0)
the below is the result :
--------------------------
result.getTotalCount() is returning zero when made a call using the above code from java and returns value when made a call from hac using query,groovy using the above code.
Thanks in advance.
Request clarification before answering.
Hard to tell without the query and more context. Could that be that restrictions apply to your query? from the HAC, choose the appropriate user and run the query as this user (instead of the default admin user). Tell us what you get.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
select {p.code}, {sl.available}, {sl.commitedQty}, {sl.threshold}, ({sl.available}-{sl.commitedQty}), {p.pgroup} from { stocklevel as sl join warehouse as w on {sl.warehouse}={w.pk} and {w.code}=?warehousepk join product as p on {sl.productcode} ={p.code} and {p.code} not like 'DPP%' join catalogversion as catv on {p.catalogVersion} = {catv.pk} and {catv.version}=?version join catalog as cat on {catv.catalog} = {cat.pk} and {cat.id}=?catalog }
I am querying product and stock information of the product where , I am unable to get that from java code .
Got values from hac using admin user.
will try and get back to you querying from hac with a different user
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.