mongoDB prefix wildcard: fulltext-search ($text) find part with search-string

mdunisch

I have mongodb with a $text-Index and elements like this:

{
   foo: "my super cool item"
}
{
   foo: "your not so cool item"
}

If i do search with

mycoll.find({ $text: { $search: "super"} })

i get the first item (correct).

But i also want to search with "uper" to get the fist item - but if i try:

mycoll.find({ $text: { $search: "uper"} })

I dont get any results.

My Question: If there is a way to use $text so its finds results with a part of the searching string? (e.g. like '%uper%' in mysql)

Attention: I dont ask for a regex only search - i ask for a regex-search within a $text-search!

francadaval

It's not posible to do it with $text operator.

Text indexes are created with the terms included in the string value or in a strings array and the search is based in those idexes.

You can only group terms on a pharse but not take part of them.

Read $text operator reference and text indexes description.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

mongoDB prefix wildcard: fulltext-search ($text) find part with search-string

From Dev

MongoDb fulltext search AND condition

From Dev

MongoDb fulltext search AND condition

From Dev

MySql MyIsam table with fulltext search wildcard

From Dev

MongoDB fulltext search not using index

From Dev

r substring wildcard search to find text

From Dev

Fulltext search on partial word (like "prefix%")

From Dev

mongodb underscore wildcard search

From Dev

MongoDB combining find with text search

From Dev

How can I Find/Replace part of a wildcard search in Notepad++

From Dev

How to find if the part of the search string contains in the string?

From Dev

Search with wildcard in a Collection of String

From Dev

Using a _ but not as a wildcard search, its part of the string im looking for

From Dev

Full text search find a part of word

From Dev

MongoDB fulltext search + workaround for partial word match

From Dev

Fulltext search in Mongodb using Hibernate Ogm

From Dev

MongoDB fulltext search taking start of the word

From Dev

Issue with FullText or LIKE search (unable to find inventory)

From Dev

PDO fulltext search - get results even if just part of a keyword from a string is in a db column

From Dev

Escape string for use in MySQL fulltext search

From Dev

MySQL FULLTEXT search for words at beginning or end of string

From Dev

Search string in string with wildcard char

From Dev

Find wildcard search not working in /etc

From Dev

Wildcard search in MySQL full-text search

From Dev

Search list of unique _id as String in mongoDB with find()

From Dev

Grep search for a string by pattern and then find part of this string inside of another file

From Dev

Fulltext search in PHP

From Dev

Tuning Postgres Fulltext search

From Dev

MySQL Crash on Fulltext search

Related Related

  1. 1

    mongoDB prefix wildcard: fulltext-search ($text) find part with search-string

  2. 2

    MongoDb fulltext search AND condition

  3. 3

    MongoDb fulltext search AND condition

  4. 4

    MySql MyIsam table with fulltext search wildcard

  5. 5

    MongoDB fulltext search not using index

  6. 6

    r substring wildcard search to find text

  7. 7

    Fulltext search on partial word (like "prefix%")

  8. 8

    mongodb underscore wildcard search

  9. 9

    MongoDB combining find with text search

  10. 10

    How can I Find/Replace part of a wildcard search in Notepad++

  11. 11

    How to find if the part of the search string contains in the string?

  12. 12

    Search with wildcard in a Collection of String

  13. 13

    Using a _ but not as a wildcard search, its part of the string im looking for

  14. 14

    Full text search find a part of word

  15. 15

    MongoDB fulltext search + workaround for partial word match

  16. 16

    Fulltext search in Mongodb using Hibernate Ogm

  17. 17

    MongoDB fulltext search taking start of the word

  18. 18

    Issue with FullText or LIKE search (unable to find inventory)

  19. 19

    PDO fulltext search - get results even if just part of a keyword from a string is in a db column

  20. 20

    Escape string for use in MySQL fulltext search

  21. 21

    MySQL FULLTEXT search for words at beginning or end of string

  22. 22

    Search string in string with wildcard char

  23. 23

    Find wildcard search not working in /etc

  24. 24

    Wildcard search in MySQL full-text search

  25. 25

    Search list of unique _id as String in mongoDB with find()

  26. 26

    Grep search for a string by pattern and then find part of this string inside of another file

  27. 27

    Fulltext search in PHP

  28. 28

    Tuning Postgres Fulltext search

  29. 29

    MySQL Crash on Fulltext search

HotTag

Archive