{"url":"https://docs.blockstack.org/core/naming/search.html","headline":"How to build a Profile Search Index","dateModified":"2018-10-29T13:33:04-07:00","datePublished":"2018-10-29T13:33:04-07:00","author":{"@type":"Person","name":"Blockstack"},"description":"How to build a Profile Search Index","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/search.html"},"@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/search.html","headline":"How to build a Profile Search Index","dateModified":"2018-10-26T14:29:29-07:00","datePublished":"2018-10-26T14:29:29-07:00","author":{"@type":"Person","name":"Blockstack"},"description":"How to build a Profile Search Index","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/search.html"},"@type":"BlogPosting","@context":"http://schema.org"}</script>
{"description":"How to build a Profile Search Index","author":{"@type":"Person","name":"Blockstack"},"@type":"BlogPosting","url":"http://localhost:4000/core/naming/search.html","headline":"How to build a Profile Search Index","dateModified":"2018-10-10T19:31:19-07:00","datePublished":"2018-10-10T19:31:19-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"http://localhost:4000/core/naming/search.html"},"@context":"http://schema.org"}</script>
{"description":"How to build a Profile Search Index","author":{"@type":"Person","name":"Blockstack"},"@type":"BlogPosting","url":"http://localhost:4000/core/naming/search.html","headline":"How to build a Profile Search Index","dateModified":"2018-10-10T20:21:27-07:00","datePublished":"2018-10-10T20:21:27-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"http://localhost:4000/core/naming/search.html"},"@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/search.html","author":{"@type":"Person","name":"Blockstack"},"headline":"How to build a Profile Search Index","dateModified":"2018-10-11T20:13:49-07:00","description":"How to build a Profile Search Index","datePublished":"2018-10-11T20:13:49-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/search.html"},"@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/search.html","author":{"@type":"Person","name":"Blockstack"},"headline":"How to build a Profile Search Index","dateModified":"2018-10-12T16:13:18-07:00","description":"How to build a Profile Search Index","datePublished":"2018-10-12T16:13:18-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/search.html"},"@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/search.html","author":{"@type":"Person","name":"Blockstack"},"headline":"How to build a Profile Search Index","dateModified":"2018-10-16T08:30:56-07:00","description":"How to build a Profile Search Index","datePublished":"2018-10-16T08:30:56-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/search.html"},"@type":"BlogPosting","@context":"http://schema.org"}</script>
{"url":"https://docs.blockstack.org/core/naming/search.html","author":{"@type":"Person","name":"Blockstack"},"headline":"How to build a Profile Search Index","dateModified":"2018-10-22T07:59:39-07:00","description":"How to build a Profile Search Index","datePublished":"2018-10-22T07:59:39-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/search.html"},"@type":"BlogPosting","@context":"http://schema.org"}</script>
>>>>>>> 726089e... Updating with review comments
>>>>>>> 2c752d6... Adding in changes for token site
{"datePublished":"2018-10-29T08:41:40-07:00","url":"https://docs.blockstack.org/core/naming/search.html","dateModified":"2018-10-29T08:41:40-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.blockstack.org/core/naming/search.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"How to build a Profile Search Index","@type":"BlogPosting","headline":"How to build a Profile Search Index","@context":"http://schema.org"}</script>
{"datePublished":"2018-10-29T11:09:45-07:00","url":"http://localhost:4000/core/naming/search.html","dateModified":"2018-10-29T11:09:45-07:00","mainEntityOfPage":{"@type":"WebPage","@id":"http://localhost:4000/core/naming/search.html"},"author":{"@type":"Person","name":"Blockstack"},"description":"How to build a Profile Search Index","@type":"BlogPosting","headline":"How to build a Profile Search Index","@context":"http://schema.org"}</script>
<p><strong>Step 2:</strong> Make sure you have Blockstack Core running locally (see <ahref="https://github.com/blockstack/blockstack-core/blob/master/README.md#quick-start">instructions</a>). We highly
recommend using a local node because the search subsystem issues thousands of calls to
Blockstack Core for re-indexing and remote nodes can slow down performance.</p>
</li>
<li><strong>Step 3:</strong> Fetch the data for the .id namespace and respective profiles. Note, you may want to redirect stderr to a file, as there is a lot of debug output.</li>
</ul>
<divclass="highlighter-rouge"><divclass="highlight"><preclass="highlight"><code>$ cd api/
$ python -m search.fetch_data --fetch_namespace
$ python -m search.fetch_data --fetch_profiles
</code></pre></div></div>
<ul>
<li><strong>Step 4:</strong> Create the search index:</li>
<ahref="https://twitter.com/intent/tweet?text=How to build a Profile Search Index&url=http://localhost:4000/core/naming/search.html&via=&related="rel="nofollow"target="_blank"title="Share on Twitter"onclick="window.open(this.href, 'twitter', 'width=550,height=235');return false;"><spandata-uk-icon="icon: twitter; ratio: 1.2"></span></a>
/* A CSS selector that points to your search box */
searchBox: {
selector: '#searchBox'
},
results: {
embedConfig: undefined, // {'url':undefined,'contentBlock':'.page-content-body'}, // if url is given the page will change to that URL and look for the content block there to insert the results
fullScreenConfig: undefined, // {trigger: '#ss360-search-trigger', caption: 'Search this site'}, trigger is the CSS selector to the element that starts the search full screen overlay and searchCaption the caption on the full screen search page
caption: 'Found #COUNT# search results for \"#QUERY#\"', // the caption of the search results
group: true, // whether results should be grouped if content groups are available
filters: undefined,
num: 96, // the maximum number of search results to be shown
highlightQueryTerms: true, // whether to highlight the query terms in search results
moreResultsButton: "Show more results", // HTML for the more results button, all results will be shown if this is null
noResultsText: 'Sorry, we have not found any matches for your query.', // the text to show when there are no results
queryCorrectionText: 'Did you mean "#CORRECTION#"?',
searchQueryParamName: 'ss360Query', // the name of the search query parameter
linksOpenNewTab: false, // should clicking on the result links open a new tab/window?
showSearchBoxLayover: true, //whether to show search box in search result layover
moreResultsPagingSize: 12, // the number of new results to show each time the more results button is pressed (max: 24)
orderByRelevanceText: "Relevance" // the text to be shown in order select box to describe 'order by relevance' option
},
suggestions: {
show: true, // whether to show search suggestions
maxQuerySuggestions: 3, // the maximum number of query suggestions
querySuggestionHeadline: undefined, // the headline of the query suggestions, leave blank if no headline should be shown
emptyQuerySuggestions: undefined,
showImages: false, // show images in search suggestions
num: 6, // the maximum number of search suggestions to be shown
minChars: 3, // minimum number of characters before the suggestions shows, default: 3,
maxWidth: 'auto', // the maximum width of the suggest box, default: as wide as the input box, at least 275px
throttleTime: 300, // the number of milliseconds before the suggest is triggered after finished input, default: 300ms
extraHtml: undefined, // extra HTML code that is shown in each search suggest, you can even show values of datapoints here,
highlight: true, // whether matched words should be highlighted, default: true
},
smart404: { /* The caption of the search results. */
caption: 'These links might be useful', /* The string in the title that identifies the page as a 404 page. */
identifier: 'Page not found', /* A CSS selector that points to the area in which the alternative links should be shown. */