Samepoint Monitor

免费增值
通过 samepoint | 已更新 4 days ago | Social
Health Check

N/A

README

Samepoint Trends API

The Samepoint Trend API Data-set represent a collection of current trends in news and media. It does not include everything in social media however it can be trained to find most content when put in monitoring mode.

Monitoring

Note that monitoring is a paid service that will require a conversation with our team . Email us at learn@samepoint.com for details.

Defaults

The Samepoint Social Media API defaults to the following conditions: Default Boolean Operator: OR

Default search field: content

Fields

The Samepoint Social Media API supports fielded data. When performing a search you can either specify a field, or use the default field ( content ). You can search any field by typing the field name followed by a colon “:” and then the term you are looking for.

Search Switches Available: /q

  • title example: /q/title:President/
  • content example: /q/content:President/
  • date range example: /q/president/fromdate/2013-5-1/todate/2013-6-1
  • refer_site example: /q/refer_site:blogspot.com/
  • name ( of poster ) example: /q/name:mary/

As an example, let’s assume a Social Media API index contains two fields, title and content where content is the default field. If you want to find the document with a title containing “President” which contains the content “economy”, you can enter: (title:“President” AND content:“economy)”

BEST Practice: URLENCODE the q var. Remember Boolean Operator are all CAPS … notice AND in above example

Note: We love Lucene. So if you do too, searching will be a breeze. If you are new to Lucene search, here are some tips.

Wildcard Searches

Social Media API supports single and multiple character wildcard searches within single terms (not within phrase queries).

  • To perform a single character wildcard search use the “?” symbol.
    To perform a multiple character wildcard search use the "" symbol.

The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for “text” or “test” you can use the search:

  • te?t

Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search: test*
You can also use the wildcard searches in the middle of a term. te*t
Note: You cannot use a * or ? symbol as the first character of a search.

Fuzzy Searches

Social Media API supports fuzzy searches based on the Levenshtein Distance, or Edit Distance algorithm. To do a fuzzy search use the tilde, “~”, symbol at the end of a Single word Term. For example to search for a term similar in spelling to “roam” use the fuzzy search: roam~ This search will find terms like foam and roams. Starting with Social Media V2 an additional (optional) parameter can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example: roam~0.8 The default that is used if the parameter is not given is 0.5.

Proximity Searches

Social Media API supports finding words are a within a specific distance away. To do a proximity search use the tilde, “~”, symbol at the end of a Phrase. For example to search for a “economy” and “President” within 10 words of each other in a document use the search: “President economy”~10

Boosting a Term

Social Media API provides the relevance level of matching comments based on the terms found. To boost a term use the caret, “^”, symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be. Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for President economy and you want the term “President” to be more relevant boost it using the ^ symbol along with the boost factor next to the term.

You would enter:
President^4 economy This will make comments with the term President appear more relevant.

You can also boost Phrase Terms as in the example: /q/“President economy”^4 “economy”/ By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)

Boolean Operators

Boolean operators allow terms to be combined through logic operators. Social Media API supports AND, “+”, OR, NOT and “-” as Boolean operators(Note: Boolean operators must be ALL CAPS). The AND operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the AND operator is used.

OR Operator

The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. The symbol || can be used in place of the word OR. To search for comments that contain either “President economy” or just “President” use the
/q/“President economy” President “President economy” OR President/

AND Operator

The AND operator matches comments where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND. To search for comments that contain “President economy” and “Economy” use the
q/“President economy” AND “Economy”/

  • Operater

The “” or required operator requires that the term after the “” symbol exist somewhere in the field of a single document. To search for comments that must contain “President” and may contain “economy” use the query:

/q/+President economy/

NOT Operator

The NOT operator excludes comments that contain the term after NOT. This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT. To searbe used with just one term. For example, thech for comments that contain “President economy” but not “Economy” use the query: /q/“President economy” NOT “Economy”/

Note: The NOT operator cannot following search will return no results: NOT “President economy”

  • Operator

The “-” or prohibit operator excludes comments that contain the term after the “-” symbol. To search for comments that contain “President economy” but not “Economy” use the query: “President economy” -“Economy”

Grouping

Social Media API supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query. To search for either “President” or “economy” and “website” use the /q/(President OR economy) AND website/ This eliminates any confusion and makes sure you that website must exist and either term President or economy may exist.

Field Grouping

Social Media API supports using parentheses to group multiple clauses to a single field. To search for a title that contains both the word “return” and the phrase “social media” use the query: /q/title:(+return +“social media”)/

Escaping Special Characters

Social Media API supports escaping special characters that are part of the query syntax. The current list special characters are + – && || ! ( ) { } [ ] ^ " ~ * ? : \ To escape these character use the \ before the character.

For example to search for (1+1):2 use the query: /q/(1+1):2/

关注者:17
资源:
产品网站 使用条款
API 创建者:
S
samepoint
samepoint
登录并给 API 打分
打分:5 - 投票:1