if (standardSearch = true) {
You are performing an assignment with =
inside this if
statement. Use ==
to compare for equality.
As a guard against this kind of mistake, you can write the constant first:
if (true == standardSearch) {
Then you get an error if you write the wrong number of = signs.