Skip to content

Commit

Permalink
non escape sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
mirestrepo committed Dec 9, 2018
1 parent 4896fd3 commit 3d96c9c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions solr_plant_api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ function generate_query(string::String)
str_arr = Any[]
query = ""
for str in split(string1, " ")
push!(str_arr, "term:$str\~")
query = join(str_arr, "\%20OR\%20")
push!(str_arr, "term:$str~")
query = join(str_arr, "%20OR%20")
end
url_string = "http://localhost:8983/solr/ubt_plant/select?fl=*,score&q=$query&sort=score%20desc"
#url_string = "http://bcbi.brown.edu/solr/solr/ubt_plant/select?fl=*,score&q=$query&sort=score%20desc"
Expand All @@ -67,16 +67,16 @@ function generate_sub_query(string::String, not_arr)
yes_query = ""
not_query = ""
for str in split(string1, " ")
push!(str_arr, "term:$str\~")
yes_query = join(str_arr, "\%20OR\%20")
push!(str_arr, "term:$str~")
yes_query = join(str_arr, "%20OR%20")
end
if length(not_arr) > 0
name_arr = String[]
for name in not_arr
#println("$name \=\>")
for str in split(name, " ")
push!(name_arr, "term:$str")
not_query = join(name_arr, "\%20OR\%20")
not_query = join(name_arr, "%20OR%20")
end
end
query = "\($yes_query\)%20NOT\%20\($not_query\)"
Expand Down

0 comments on commit 3d96c9c

Please sign in to comment.