Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search by tag and tag substring returns no results #109

Open
mrkvon opened this issue May 17, 2024 · 2 comments
Open

Search by tag and tag substring returns no results #109

mrkvon opened this issue May 17, 2024 · 2 comments

Comments

@mrkvon
Copy link

mrkvon commented May 17, 2024

Hello!

Bug

When I send REQ with #t: ['photography'], I receive plenty of results. But if I send #t: ['photography', 'photogr'], the results are empty. For some reason, the unmatched substring tag cancels matched full tag.

Sending REQ #t: ['photo', 'photography'] returns results with photo tag, results with both tags, but doesn't return results with photography only.

The same happened with #g tag (geohash).

Expected results

When I send REQ with #t: ['photography', 'photogr'], I would expect to receive events with ['t': 'photography'] tag.

Context

I tested and reproduced this issue against relays wss://relay.damus.io, wss://nostr.wine, wss://relayable.org with issues.
Tested against wss://lightningrelay.com which uses different software, without issues.

It looks like the issue is with this software, but I'm not sure.

Used nostr-tools to send the requests.

Thank you!

@hoytech
Copy link
Owner

hoytech commented Jul 19, 2024

Yeah I'm pretty sure this is a bug, thanks for reporting! I think I know the problem and I'll try to fix it for next release.

hoytech added a commit that referenced this issue Aug 30, 2024
@hoytech
Copy link
Owner

hoytech commented Aug 30, 2024

I fixed this in the following commit which will be included in the next major strfry release (1.0 series).

77b208e

The bug was an error in an optimisation related to the prefix matching of ids/authors filters which incorrectly applied to tags as well. I rolled the fix into a big refactor where prefix matching was removed altogether (since this feature was also removed from NIP-01).

hoytech added a commit that referenced this issue Sep 5, 2024
cosmicpsyop pushed a commit to cosmicpsyop/strfry that referenced this issue Sep 18, 2024
cosmicpsyop pushed a commit to cosmicpsyop/strfry that referenced this issue Sep 18, 2024
cosmicpsyop pushed a commit to cosmicpsyop/strfry that referenced this issue Oct 13, 2024
cosmicpsyop pushed a commit to cosmicpsyop/strfry that referenced this issue Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants