Searching syntax

Michel Pauw
Michel Pauw Member Posts: 566 ✭✭✭
edited November 2024 in English Forum

Currently I have:

- 23 Indonesian resources

- 2 Norwegian resources

- 2 Swahili resources

I want to make a collection that contains all these resources. Apparently the following searches returned all 27 resources: 

- "language:Indonesian OR language:Norwegian OR language:Swahili"
- "language:(Indonesian, Norwegian, Swahili)"

However, I tried a few other searches, with quite surprising results.

So I tried:

1) "language:(Indonesian OR Norwegian OR Swahili)"  --> 6 hits; even an English resource!

2) "language:{Indonesian OR Norwegian OR Swahili}"  --> 0 hits

3) "language:(Indonesian OR Norwegian OR Swahili}"  --> 32 hits (also some English)

4) "language:{Indonesian OR Norwegian OR Swahili)"  --> 32 hits (also some English)

Can someone explain to me what's the effect of (), {}, (}, {), and OR in a search list?

Dell XPS 17 9700, W11, 32GB, 1TB SSD, NVIDIA GeForce RTX 2060
L5+L9+L10 Portfolio | Logos Max | Translator's Workplace

Comments

  • Mark Barnes
    Mark Barnes Member Posts: 15,432 ✭✭✭

    Can someone explain to me what's the effect of (), {}, (}, {), and OR in a search list?

    The syntax used in the library and for creating collections is a simplified version of the one used in searching.

    In library/collections:

    1. { and } have no effect. Don't use them.
    2. If you want to specify multiple criteria for a single field, you need to use parentheses and a comma: language:(Indonesian, Norwegian, Swahili)
    3. Other than the above, OR works as you would expect, although you can use a comma if you prefer.

    This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!

  • Michel Pauw
    Michel Pauw Member Posts: 566 ✭✭✭

    I still wonder why option 1 has different results (only using the OR instead of a comma)...

    Dell XPS 17 9700, W11, 32GB, 1TB SSD, NVIDIA GeForce RTX 2060
    L5+L9+L10 Portfolio | Logos Max | Translator's Workplace

  • Graham Criddle
    Graham Criddle MVP Posts: 32,854

    I still wonder why option 1 has different results (only using the OR instead of a comma)...

    Isn't this addressed in Mark's second point above?

    If you want to specify multiple criteria for a single field, you need to use parentheses and a comma: language:(Indonesian, Norwegian, Swahili)

  • Michel Pauw
    Michel Pauw Member Posts: 566 ✭✭✭

    I still wonder why option 1 has different results (only using the OR instead of a comma)...

    Isn't this addressed in Mark's second point above?

    If you want to specify multiple criteria for a single field, you need to use parentheses and a comma: language:(Indonesian, Norwegian, Swahili)

    True, but I think I don't understand his:

    3. Other than the above, OR works as you would expect, although you can use a comma if you prefer.

    Dell XPS 17 9700, W11, 32GB, 1TB SSD, NVIDIA GeForce RTX 2060
    L5+L9+L10 Portfolio | Logos Max | Translator's Workplace

  • Michel Pauw
    Michel Pauw Member Posts: 566 ✭✭✭

    I still wonder why option 1 has different results (only using the OR instead of a comma)...

    Isn't this addressed in Mark's second point above?

    If you want to specify multiple criteria for a single field, you need to use parentheses and a comma: language:(Indonesian, Norwegian, Swahili)

    True, but I think I don't understand his:

    3. Other than the above, OR works as you would expect, although you can use a comma if you prefer.

    Dell XPS 17 9700, W11, 32GB, 1TB SSD, NVIDIA GeForce RTX 2060
    L5+L9+L10 Portfolio | Logos Max | Translator's Workplace

  • Michel Pauw
    Michel Pauw Member Posts: 566 ✭✭✭

    I still wonder why option 1 has different results (only using the OR instead of a comma)...

    Isn't this addressed in Mark's second point above?

    If you want to specify multiple criteria for a single field, you need to use parentheses and a comma: language:(Indonesian, Norwegian, Swahili)

    True, but I think I don't see his point in

    3. Other than the above, OR works as you would expect, although you can use a comma if you prefer.

    Dell XPS 17 9700, W11, 32GB, 1TB SSD, NVIDIA GeForce RTX 2060
    L5+L9+L10 Portfolio | Logos Max | Translator's Workplace

  • Graham Criddle
    Graham Criddle MVP Posts: 32,854

    True, but I think I don't see his point in

    I think the points Mark was trying to make in 2 & 3 was that when you are wanting to use multiple criteria for a single field you need to use commas. In most other scenarios commas and OR are interchangeable.

    But I may be missing your point!

    If so, please clarify / expand

  • - "language:Indonesian OR language:Norwegian OR language:Swahili"
    - "language:(Indonesian, Norwegian, Swahili)"

    Personally have:

    • 5 Dutch resources
    • 4 Norwegian resources
    • 27 Syriac resources

    Lang:(Dutch,Norwegian,Syriac)

    filters Library to 36 resources. Personally like Camel Case for readability. Library filtering is case insensitive. Also, language can be abbreviated: lang:

    Lang:Dutch OR Lang:Norwegian OR Lang:Syriac

    filters library to the same 36 resources.

    Lang:(Dutch OR Norwegian OR Syriac)

    has an invalid Library filtering syntax (using OR inside parenthesis for a list of values). Noticed no Dutch language resources plus a subset of Syriac resources. Greek language Philo was included because the description contains Norwegian.  English resource "New Dictionary of Theology" is included because description contains Dutch. The Syriac subset of 13 resources is puzzling since some resources not in filter list have Syriac in their description.

    Can someone explain to me what's the effect of (), {}, (}, {), and OR in a search list?

    Library does not have sections nor milestones so { and } are invalid for filtering so surprising results are an interpretation of invalid filter syntax. Personally dreaming of an invalid indicator for library filtering and search so can "see" what character(s) are confusing during parsing.

    Keep Smiling [:)]

  • Michel Pauw
    Michel Pauw Member Posts: 566 ✭✭✭

    " rel="nofollow">Keep Smiling 4 Jesus :) said:

    Lang:(Dutch OR Norwegian OR Syriac) has an invalid Library filtering syntax (using OR inside parenthesis for a list of values). Noticed no Dutch language resources plus a subset of Syriac resources. Greek language Philo was included because the description contains Norwegian.  English resource "New Dictionary of Theology" is included because description contains Dutch. The Syriac subset of 13 resources is puzzling since some resources not in filter list have Syriac in their description.

    Can someone explain to me what's the effect of (), {}, (}, {), and OR in a search list?

    Library does not have sections nor milestones so { and } are invalid for filtering so surprising results are an interpretation of invalid filter syntax. Personally dreaming of an invalid indicator for library filtering and search so can "see" what character(s) are confusing during parsing.

    So, it's crucial to understand which syntax you should use in which places. Please forgive my ignorance, but is there any place where to go for a full list of search and filter syntax? Both for searches and for filtering in the library?

    Dell XPS 17 9700, W11, 32GB, 1TB SSD, NVIDIA GeForce RTX 2060
    L5+L9+L10 Portfolio | Logos Max | Translator's Workplace

  • Michel Pauw
    Michel Pauw Member Posts: 566 ✭✭✭

    " rel="nofollow">Keep Smiling 4 Jesus :) said:

    Lang:(Dutch OR Norwegian OR Syriac) has an invalid Library filtering syntax (using OR inside parenthesis for a list of values). Noticed no Dutch language resources plus a subset of Syriac resources. Greek language Philo was included because the description contains Norwegian.  English resource "New Dictionary of Theology" is included because description contains Dutch. The Syriac subset of 13 resources is puzzling since some resources not in filter list have Syriac in their description.

    Can someone explain to me what's the effect of (), {}, (}, {), and OR in a search list?

    Library does not have sections nor milestones so { and } are invalid for filtering so surprising results are an interpretation of invalid filter syntax. Personally dreaming of an invalid indicator for library filtering and search so can "see" what character(s) are confusing during parsing.

    So, it's crucial to understand which syntax you should use in which places.When I look at some people's searches, I often think: hey, how did you get there? How did you get to know the correct syntax? Please forgive my ignorance, but is this only by trial and error, of is there some documentation for:

    - how to use search syntax

    - how to use filter syntax

    - how to use syntax search syntax

    - etc.

    Dell XPS 17 9700, W11, 32GB, 1TB SSD, NVIDIA GeForce RTX 2060
    L5+L9+L10 Portfolio | Logos Max | Translator's Workplace

  • MJ. Smith
    MJ. Smith MVP Posts: 53,937

    how did you get there? How did you get to know the correct syntax?

    I read the wiki and practiced with examples from the forums.

    https://wiki.logos.com/Search_HELP

    Orthodox Bishop Alfeyev: "To be a theologian means to have experience of a personal encounter with God through prayer and worship."; Orthodox proverb: "We know where the Church is, we do not know where it is not."

  • ... is there any place where to go for a full list of search and filter syntax? Both for searches and for filtering in the library?

    Help has substantially improved.

    Concur with Help statement about search notation being daunting.

    MJ. Smith said:

    how did you get there? How did you get to know the correct syntax?

    I read the wiki and practiced with examples from the forums.

    https://wiki.logos.com/Search_HELP

    Logos wiki also has => Library

    Thankful for many forum discussions, which provided motivation for search (and library collections) trial and error so have learned a lot plus have a lot to learn.

    Thankful for Favorites where have saved many search examples so can reopen later, which has been helpful for several discussions.

    Keep Smiling [:)]