0

How do I do full boolean text search in R? I am using str_match which works only with OR or | operator, or I use Reduce function with &. Is there a way to do AND, OR and XOR seamlessly for text search in R?

Apricot
  • 2,925
  • 5
  • 42
  • 88
  • 1
    Please include a specific example. – nrussell Aug 20 '15 at 17:08
  • An `and` for regex might be impossible, have a look at [here](http://stackoverflow.com/questions/3041320/regex-and-operator) and [here](http://stackoverflow.com/questions/469913/regular-expressions-is-there-an-and-operator). I think you need regex's `lockahead` and `lockbehind`. – SabDeM Aug 20 '15 at 17:08
  • `library(stringi)` supports using `&` in char classes. For more info, read `help("stringi-search-charclass", package = "stringi")` – Rich Scriven Aug 20 '15 at 17:16
  • Thank you SabDem and Richard Scriven. I will read the resources. – Apricot Aug 20 '15 at 17:29

1 Answers1

-1

consider using the rlucene package which connects to the lucene search library which provides full-text search including a BooleanQuery which siport AND OR and NOT.

Oren Bochman
  • 1,173
  • 3
  • 16
  • 37