Skip to content

throwing error when the something equals _ #250

@luxdo

Description

@luxdo

I am writing to report a potential bug I encountered while using the RediSearch om library.

Issue:

When attempting to search for terms containing an underscore character (_), we receive a SearchError indicating a syntax error in the query. The specific error message states:

Syntax error at offset 10 near token "_".
This is often the result of using a stop word in the query.

However, the provided link to the list of default stop words in RediSearch (https://github.com/stopwords-iso/stopwords-en) does not include the underscore character. (also the stopwords link in the description of redis-om-node is not available-showing 404 error)

Steps to Reproduce:
const blockedIp = await limitedsRepository
.search()
.where('ip')
.equals(ip)
.and('token')
.equals(token) // throws an error when token = '_'
.return.first()
Execute the search query containing an underscore (e.g., "search_term").
Observe the SearchError with the aforementioned message.
Expected Behavior:

The search query should be processed successfully, even with terms containing underscores. This is because the underscore is a commonly used character in various contexts and shouldn't be treated as a stop word.

Impact:

This issue prevents us from searching for data containing underscores in our application, potentially limiting the flexibility of our search functionality.

Request:

We kindly request you to investigate this potential bug and consider the following:

Is this a documented limitation of RediSearch queries? If so, I would appreciate clarification on how to handle such cases.
Could there be a configuration option to exclude the underscore character from the default stop word list?
I believe this issue would be beneficial to address for broader usability of RediSearch.


Dear Guy and Redis OM Development Team,

I am writing to request the addition of the following features to the Redis OM library:

Relationship-based querying: The ability to query data based on relationships between entities would significantly enhance the flexibility and power of the library. This would allow developers to perform complex queries that involve multiple entities and their connections.

Database transactions: Implementing support for database transactions would ensure data consistency and integrity, especially in scenarios where multiple operations need to be performed atomically.

Simplified configuration for Redis persistence: Providing an easy-to-use API function to configure Redis persistence data permanently (either AOF or RDB) would streamline the setup process and make it more accessible to developers.

These features would greatly improve the usability and capabilities of the Redis OM library, making it a more compelling choice for developers working with Redis.

Once these features have been added, I would be interested in hearing your perspective on the advantages of using Redis OM over other competing libraries. What sets Redis OM apart and makes it the preferred choice for developers?

Thank you for your time and consideration.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions