Skip to content

Commit

Permalink
Merge pull request #7 from neurostuff/6-add-search-to-docs
Browse files Browse the repository at this point in the history
feat: added basic search docs
  • Loading branch information
adelavega authored Sep 11, 2023
2 parents 39dd6be + 9840f1f commit 4de4fab
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
40 changes: 40 additions & 0 deletions docs/guide/walkthrough/Studies/Searching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Neurosynth-Compose works with the neurostore database to provide a convenient and functional interface to search for studies.

### Search Mechanics

Searching for semantically relevant results utilizes PostgreSQL's support of tokens/vectors when searching documents for relevant text. This approach excludes commonly used words like "a", "it", "on", and "the". It also aims to return similar words and word forms during the search (the term "brain" should return "brains" for example). For a more in depth understanding, you can take a look at the [docs for text search](https://www.postgresql.org/docs/current/textsearch-controls.html).

Searches are conducted across title and abstract fields.
The input supports `AND`, `OR`, and `NOT` operations.

For example to use the `AND` operator, you can enter in a value like `nicotine and memory`. Similarly, you can enter an input like `smoking or nicotine` for the `OR` operator, and `smoking -marijuana` for the `NOT` operator (where marijuana is the excluded term).

In order to ensure that text is grouped together (i.e. one word follows the other) you can include the words in quotes. For example, the search `"anterior insula"` will only yield results where the word "anterior" is followed by the word "insula". You can then use the above search operators on grouped words: `smokers -"anterior insula"`

:::caution
PostgreSQL's search treats the `OR` operator as a union between multiple different search groups. This means that for more complicated queries, you will need to repeat
certain `AND` or `NOT` operators amongst multiple clauses.

For example, consider the search: `nicotine OR smoking -marijuana`.
In this example, the search results returned to you will be all the results yielded from `nicotine` unioned with all the results of `smoking -marijuana`. Having `-marijuana` here does not relate to the entire search term - just `smoking`.

To ensure that you do not have any mention of marijuana in your returned papers, you must search: `nicotine -marijuana or smoking -marijuana`.

The same case applies for `AND` operations. In general, `OR` unions between various search groups consisting of `and`, `not`, and quoted search terms.
:::

### Study Data Type

Studies can either report their findings as coordinate data, image data, or in some cases, both. Using the Study Data Type button, you
can filter the results so that only coordinate or image data appears. For example, if you are doing a coordinate based meta-analysis, you
will want to filter the results to show only studies that report coordinates.

### Sorting Results

Use the Sort By feature to sort the results based on a given property. You can also set this to be ascending or descending.

### Filtering

To filter the results of the search, click on the orange <span style={{ fontWeight: 'bold', color: 'orange' }}>Add Filter</span> button. You have the option of filtering by title, description, author, or publication. Enter the string you want to filter by and click add to apply the filter.

Only one filter can be applied for each field. In order to remove a filter, simply click on the delete button on the given filter.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ title: Studies Page
sidebar_position: 0
---

# Studies Page

###
# Studies Page
14 changes: 14 additions & 0 deletions docs/guide/walkthrough/search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Searching
sidebar_position: 4
---

# Intro To Searching

### Searching Studies

Neurosynth-Compose supports multiple ways to search for studies.

### Searching Studysets

### Searching Meta-Analyses

0 comments on commit 4de4fab

Please sign in to comment.