GSA Search - query syntax - google-search-appliance

I am trying to create a query for GSA Search:
The query suppose to bring all the results that exclude some texts inside meta tag, some thing like:
inmeta:Education -first and -second and -courses...
But no luck with that. Is anybody knows what the right syntax is?

I have used the equal to condition before and the query looks like this -
(inmeta:education=first OR inmeta:education=second)
If your results must not include all the pages with the meta tag Education not equal to the value first then use -
inmeta:Education-first
For multiple values you can use the OR condition -
(inmeta:Education-first OR inmeta:Education-second)
You can find a lot more information here -
https://developers.google.com/search-appliance/documentation/46/xml_reference#request_query_terms
Hope this helps you.

Related

Elasticsearch doesn't find values containing "-"

I ran into an issue where elasticsearch is not able to find indexed categories that contain an "-" in their slug. The category given is "wc-sitze". When I query for "wc", the category is found, and when I query for "sitze", it is also found, however when I query for the whole thing "wc-sitze", it is not found. I have checked with several other categories, and it seems that always the "-" is messing it up.
Any ideas?
Thanks in advance
Looks like you are using the text field with default analyzer standard which removes the special char like -. you need to change the analyzer to make it work.

ElasticSearch: A way to know which term hit in which field?

there are usecases where I really would like to know which term was matched in which field by my search. With this information I would like to disclose the information which field caused the hit to the user on my webpage. I also would like to know the term playing part in the hit. In my case it is a database identifier, so I would take the matched term - an ID - get the respective database record and display useful information to the user.
I currently know two ways: Highlighting and the explain API. However, the first requires stored values which seems unnecessary. The second is meant for debugging only and is rather expensive so I wouldn't want it to run with every query.
I don't know another way which is confusing: The highlighting algorithms need the information I want to use anyway, can't I just get it somehow?
On a related note, I would also be interested in the opposite case: Which term did not hit at all? This information would allow for features like "terms that didn't match your query" like Google does sometimes (where the respective words are shown in grey-strikeout).
Thanks for hints!

GSA report with 'Searches that returned results' and 'Searches that did not return results'

I am using GSA 7.2, In GSA Search Report It have two Report types
Searches that returned results
Searches that did not return results
what is difference between this types?
I tried Last week Search Report with both types, I am getting few same Keywords and Queries in Both Report types with different Occurrences count. Here my question is if GSA is showing result for some Keywords and Queries then It should not show in without result type, May be my Understanding is wrong, Please correct me.
Thank you for help
Looks like this issue is there for a long time.
Check this out. Not sure whether it is fixed or not, better check with google support.
BTW, Do you have user specific search (Role based search)? If so, just try to search using same term for all user/role and see any user/role gets zero results.
When you run the reports, are you restricting the search to a specific collection and/or time range?
If you run a report for "All Collections" then you might see items show in both reports because users are searching against a collection that does not have the documents.
What you'd want to do is run a report for a single day. If you see the same behavior for a single collection then download the search logs for that day and look for searches for that key term and see if the search query parameters are the same. If they are different then there could be some malformed search queries being executed. If not then it could be a transient issue with the GSA.

SolrNet query filtered by specific field

I can't seem to find anything online that allows me do this. Basically I'm doing a simple SolrQuery but I want to only get back results where a field is a specific value.
So to be more specific I want to execute a Solr Query where field is either A or B or C - Is this possible?
I think I'm going to need to do a SolrQueryByField joined with a SolrMultipleFilterQuery but not really sure of how to get about doing this.
Can anyone help or point me in the right direction?
add values in list<IsolrQuery> OredData ex: OredData.add(new solrQueryByField("field","A")) and add rest of ur choices ,then add it to solrMultipleCriteriaQuery(OredData,"OR") and choose "OR" as showed , then ,call ur Query passing solrMultipleCriteriaQuery(OredData,"OR") to it.
hope that i helped ;)

Conditional sorting in Solr 3.6

We're running Solr 3.6 and are trying to apply a conditional sort on the result set. To clarify, the data is a set of bids, and we want to add the option to sort by the current user's bid, so it can't function as a regular sort (as the bid will be different for each user that runs the query).
The documents in the result set include a "CurrentUserId" and "CurrentBid" field, so I think we need something like the following to sort:
sort=((CurrentUserId = 12345) ? CurrentBid : 0) desc
This is just pseudocode, but the idea is that if the currentUserId in Solr matches the user Id (12345 in this example), then sort by CurrentBid, otherwise, just use 0.
It seems like doing a sort by query might be the way to go with achieving this (or at least form part of the solution), using something like the following query:
http://localhost:8080/solr/select/?q=:&sort=query(CurrentUserId:10330 AND CurrentBid:[1 TO *])+desc
This doesn't seem to be working for me though, and results in the following error:
sort param could not be parsed as a query, and is not a field that exists in the index: ...
The Solr documentation indicates that the query function can be used as a sort parameter from Solr 1.4 onwards, so this seems like it should work.
Any advice on how to go about achieving this would be greatly appreciated.
According to the Solr Documentation link you provided,
Any type of subquery is supported through either parameter dereferencing $otherparam or direct specification of the query string in the LocalParams via "v".
So based on the examples and your query, I think one or both of the following should work:
http://localhost:8080/solr/select/?q=:&sort=query($qq)+desc&qq=(CurrentUserId:10330 AND CurrentBid:[1 TO *])
http://localhost:8080/solr/select/?q=:&sort=query({v='CurrentUserId:10330 AND CurrentBid:[1 TO *]'})+desc

Resources