I am looking for a description of the syntax and semantics that govern what can be put in QUERY; where the syntax provided for search is
https://graph.facebook.com/search?q=QUERY&type=OBJECT_TYPE
Related
I'm trying to fetch all operations related my google Cloud Functions. I need to give a filter parameter for this, but it is unclear to me what this filter should actually be.
The filter is described as "standard list filter", but I couldn't find what this was referring to. From the documentation it was impossible for me to discern what the correct parameters could be.
EDIT:
So far I've tried getting it to work in the "try this API" that's in the documentation.
I've tried filters like
/operations/*
.*
*
and names such as
/v1/name/operations
/name/operations
*
The problem I'm having is that I just have no clue what a valid filter could look like, and as far as I can see it's not in the documentation other than "standard list filter".
The documentation now contains some explanations:
The supported formats of filter are:
To query for specific function:
project:*,location:*,function:*
To query for all of the latest operations for a project:
project:*,latest:true
I am using SharePoint Search API and referring link SharePoint Search REST API overview. I want to use property operators. Please refer 'Property operators that are supported in property restrictions' section in link Keyword Query Language (KQL) syntax reference
I am forming query as http://server/_api/search/query?querytext='AmountCurrency > 10.50'&selectproperties='Title,Author'
Similarly http://server/_api/search/query?querytext='AmountNumber < 20.50'&selectproperties='Title,Author'
In above queries AmountCurrency and AmountNumber are managed properties for Currency column and Number column respectively. But search api not returing any row. For me : and = operators are working fine. How to use greater than and less than operators in search API?
Make sure the field name you are using is defined in the Managed Properties in the Search Schema.
Or you can build the query using SharePoint Search Query Tool.
Got it. It is due to the managed property type. Following are the available types when we create managed properties.
Text
Integer
Decimal
Date and Time
Yes/No
Double precision float
Binary
When managed property gets created automatically for site columns, the default type is Text. While creating managed property manually only Search Service Application administrator can choose any type. All other users can choose either Text or Yes/No.
I am not SSA Administrator. So I have used default unused managed properties. Please refer https://technet.microsoft.com/en-us/library/jj219667.aspx#Anchor_8. Used RefinableDecimal00 and RefinableDecimal01 and mapped appropriate crawled property to them. Now everything is working fine
I have a couple of questions regarding the Graph Api > Search Posts functionality (http://developers.facebook.com/docs/reference/api/search/):
What operators does the QUERY paramater accept? Usually search engines accept AND, OR, exact match ("red apples") and NOT/exclusion. I'm confused about how these operators function for Facebook.
What exactly does it search through? Sometimes I see results that don't match the search query at all. Does it search through the posts's message, or through comments from posts as well?
The query parameter only accepts strings and not operators. You should specify a type too so you can filter between users, posts, etc. Depends in what you want to search for, you will need a valid user access_token.
If you are searching for posts, it will only search within the post itself, and not the comments.
I'd like to pass some parameters to Solr that should afflict the weighting of the results (I do not want to filter away results that do not match these criterias).
E.g. I'd like to have a language attribute, and if i pass the user's language to the search engine I'd like to have the results matching the language listed first. As a newbie to Solr I'd like to know if and how this is possible!
Yes, that's possible by using boost functions. See this FAQ entry or the description of boost functions for the DisMaxQueryPlugin (the dismax query parser is the default parser).
I've got a Haystack/xapian search index for django.contrib.auth.models.User. The template is simply
{{object.get_full_name}}
as I intend for a user to type in a name and be able to search for it.
My issue is this: if I search, say, Sri (my full first name) I come up with a result for the user object pertaining to my name. However, if I search Sri Ragh - that is, my full name, and part of my last name, I get no results.
How can I set Haystack up so that I can get the appropriate results for partial queries?
(I essentially want it to search *Sri Ragh*, but I don't know if wildcards would actually do the trick, or how to implement them).
This is my search query:
results = SearchQuerySet().filter(content='Sri Ragh')
I use to have a similar problem, as workaround or maybe a Fix you can change the query lookup
results = SearchQuerySet().filter(content__startswith='Sri Ragh')
The issue is that django-haystack doesn't implement all lingos from search engines. Of course you can do this.
results = SearchQuerySet().raw_search('READ THE SEARCH ENGINE QUERY SYNTAX FOR GET WILDCARD LOOKUPS')
As Django-haystack says, this is not portable.
You can use icontains or startswith.
Be careful with this one, if a query is for example 'r', this will bring you all 'Model' entities that have a 'r' in its content.
Model.objects.filter(content__icontains=query)
Model.objects.filter(content__startswith=query)
Look at the documentation