mirror of https://github.com/zlatinb/muwire
propagate regex flag in queries in preparation for regex search
parent
548a981b16
commit
bd3555dce9
|
@ -157,6 +157,7 @@ abstract class Connection implements Closeable {
|
||||||
query.compressedResults = e.searchEvent.compressedResults
|
query.compressedResults = e.searchEvent.compressedResults
|
||||||
query.collections = e.searchEvent.collections
|
query.collections = e.searchEvent.collections
|
||||||
query.searchPaths = e.searchEvent.searchPaths
|
query.searchPaths = e.searchEvent.searchPaths
|
||||||
|
query.regex = e.searchEvent.regex
|
||||||
if (e.searchEvent.searchHash != null)
|
if (e.searchEvent.searchHash != null)
|
||||||
query.infohash = Base64.encode(e.searchEvent.searchHash)
|
query.infohash = Base64.encode(e.searchEvent.searchHash)
|
||||||
query.replyTo = e.replyTo.toBase64()
|
query.replyTo = e.replyTo.toBase64()
|
||||||
|
@ -286,6 +287,9 @@ abstract class Connection implements Closeable {
|
||||||
boolean searchPaths = false
|
boolean searchPaths = false
|
||||||
if (search.searchPaths != null)
|
if (search.searchPaths != null)
|
||||||
searchPaths = search.searchPaths
|
searchPaths = search.searchPaths
|
||||||
|
boolean regex = false
|
||||||
|
if (search.regex != null)
|
||||||
|
regex = search.regex
|
||||||
|
|
||||||
byte[] sig = null
|
byte[] sig = null
|
||||||
if (search.sig != null) {
|
if (search.sig != null) {
|
||||||
|
@ -342,6 +346,7 @@ abstract class Connection implements Closeable {
|
||||||
compressedResults : compressedResults,
|
compressedResults : compressedResults,
|
||||||
collections : collections,
|
collections : collections,
|
||||||
searchPaths: searchPaths,
|
searchPaths: searchPaths,
|
||||||
|
regex: regex,
|
||||||
persona : originator)
|
persona : originator)
|
||||||
QueryEvent event = new QueryEvent ( searchEvent : searchEvent,
|
QueryEvent event = new QueryEvent ( searchEvent : searchEvent,
|
||||||
replyTo : replyTo,
|
replyTo : replyTo,
|
||||||
|
|
|
@ -15,11 +15,14 @@ class SearchEvent extends Event {
|
||||||
Persona persona
|
Persona persona
|
||||||
boolean collections
|
boolean collections
|
||||||
boolean searchPaths
|
boolean searchPaths
|
||||||
|
boolean regex
|
||||||
|
|
||||||
String toString() {
|
String toString() {
|
||||||
def infoHash = null
|
def infoHash = null
|
||||||
if (searchHash != null)
|
if (searchHash != null)
|
||||||
infoHash = new InfoHash(searchHash)
|
infoHash = new InfoHash(searchHash)
|
||||||
"searchTerms: $searchTerms searchHash:$infoHash, uuid:$uuid oobInfohash:$oobInfohash searchComments:$searchComments compressedResults:$compressedResults"
|
"searchTerms: $searchTerms searchHash:$infoHash, uuid:$uuid " +
|
||||||
|
"oobInfohash:$oobInfohash searchComments:$searchComments " +
|
||||||
|
"compressedResults:$compressedResults regex:$regex"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue