diff --git a/README.md b/README.md
index 5eadc49..913006e 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ Include the dependency to your project inside your `pom.xml` file
io.github.ajclopez
mongo-spring-search
- 1.0.4
+ 1.0.5
```
@@ -65,7 +65,7 @@ Include the dependency to your project inside your `pom.xml` file
Add implementation to your project in your `build.gradle` file
```
-implementation 'io.github.ajclopez:mongo-spring-search:1.0.4'
+implementation 'io.github.ajclopez:mongo-spring-search:1.0.5'
````
## Usage
@@ -73,9 +73,9 @@ implementation 'io.github.ajclopez:mongo-spring-search:1.0.4'
Converts query into a MongoDB query object.
```java
-MongoSpringSearch.mss(String query)
+MongoSpringSearch.mss(String query);
-MongoSpringSearch.mss(String query, Optional configuration)
+MongoSpringSearch.mss(String query, Optional configuration);
```
##### Arguments
diff --git a/pom.xml b/pom.xml
index c2b0cf5..c7425af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
io.github.ajclopez
mongo-spring-search
- 1.0.4
+ 1.0.5
jar
mongo-spring-search
diff --git a/src/main/java/io/github/ajclopez/mss/criteria/CriteriaQueryVisitor.java b/src/main/java/io/github/ajclopez/mss/criteria/CriteriaQueryVisitor.java
index 638b427..c031d68 100644
--- a/src/main/java/io/github/ajclopez/mss/criteria/CriteriaQueryVisitor.java
+++ b/src/main/java/io/github/ajclopez/mss/criteria/CriteriaQueryVisitor.java
@@ -1,12 +1,11 @@
package io.github.ajclopez.mss.criteria;
-import java.util.Map;
-
-import org.springframework.data.mongodb.core.query.Criteria;
-
import io.github.ajclopez.mss.QueryBaseVisitor;
import io.github.ajclopez.mss.model.CastType;
import io.github.ajclopez.mss.model.LogicalOperation;
+import org.springframework.data.mongodb.core.query.Criteria;
+
+import java.util.Map;
/**
*
@@ -84,6 +83,7 @@ public Criteria visitCriteria(io.github.ajclopez.mss.QueryParser.CriteriaContext
}
String expression = String.format("%s%s%s", keyContext.getText().trim(), opContext.getText().trim(), valueContext.getText().trim());
+ expression = expression.replace("+", "%2B");
io.github.ajclopez.mss.model.SearchCriteria criteria = io.github.ajclopez.mss.parser.QueryParser.criteriaParser(expression, casters);
return CriteriaImpl.buildCriteria(criteria);
diff --git a/src/test/java/io/github/ajclopez/mss/SearchCriteriaTest.java b/src/test/java/io/github/ajclopez/mss/model/SearchCriteriaTest.java
similarity index 81%
rename from src/test/java/io/github/ajclopez/mss/SearchCriteriaTest.java
rename to src/test/java/io/github/ajclopez/mss/model/SearchCriteriaTest.java
index 692c8b5..ba9a46d 100644
--- a/src/test/java/io/github/ajclopez/mss/SearchCriteriaTest.java
+++ b/src/test/java/io/github/ajclopez/mss/model/SearchCriteriaTest.java
@@ -1,10 +1,8 @@
-package io.github.ajclopez.mss;
+package io.github.ajclopez.mss.model;
import org.junit.Assert;
import org.junit.Test;
-import io.github.ajclopez.mss.model.SearchCriteria;
-import io.github.ajclopez.mss.model.SearchOperation;
import io.github.ajclopez.mss.parser.QueryParser;
public class SearchCriteriaTest {
diff --git a/src/test/java/io/github/ajclopez/mss/QueryParserTest.java b/src/test/java/io/github/ajclopez/mss/parser/QueryParserTest.java
similarity index 92%
rename from src/test/java/io/github/ajclopez/mss/QueryParserTest.java
rename to src/test/java/io/github/ajclopez/mss/parser/QueryParserTest.java
index 607947b..fb33bea 100644
--- a/src/test/java/io/github/ajclopez/mss/QueryParserTest.java
+++ b/src/test/java/io/github/ajclopez/mss/parser/QueryParserTest.java
@@ -1,8 +1,7 @@
-package io.github.ajclopez.mss;
+package io.github.ajclopez.mss.parser;
import io.github.ajclopez.mss.model.CastType;
import io.github.ajclopez.mss.model.SearchCriteria;
-import io.github.ajclopez.mss.parser.QueryParser;
import org.junit.Assert;
import org.junit.Test;
diff --git a/src/test/java/io/github/ajclopez/mss/SearchPatternsTest.java b/src/test/java/io/github/ajclopez/mss/pattern/SearchPatternsTest.java
similarity index 82%
rename from src/test/java/io/github/ajclopez/mss/SearchPatternsTest.java
rename to src/test/java/io/github/ajclopez/mss/pattern/SearchPatternsTest.java
index ce8daf6..5b377f4 100644
--- a/src/test/java/io/github/ajclopez/mss/SearchPatternsTest.java
+++ b/src/test/java/io/github/ajclopez/mss/pattern/SearchPatternsTest.java
@@ -1,6 +1,5 @@
-package io.github.ajclopez.mss;
+package io.github.ajclopez.mss.pattern;
-import io.github.ajclopez.mss.pattern.SearchPatterns;
import org.junit.Assert;
import org.junit.Test;