LPS-48640 pre-check, logic is not final

Hi Ray,

Can you please take a look at the compilation error I get upon executing "ant all" in the ES module as we discussed via zulip?

Just to recall: I've imported the portal-search-elasticsearch module as standalone project into eclipse, and the editor doesn't show any error in the code, but when I try to build the module I get

````bash
tibusz@tibusz-E6520:~/git/liferay-portal/modules/portal/portal-search-elasticsearch{LPS-48640-es}$ ant all
Buildfile: /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/build.xml

all:

clean:
   [delete] Deleting directory /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/classes
   [delete] Deleting: /home/tibusz/git/liferay-portal/tools/sdk/dist/com.liferay.portal.search.elasticsearch-1.0.0.jar
   [delete] Deleting: /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/ivy.xml.MD5
   [delete] Deleting directory /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/lib
   [delete] Deleting: /home/tibusz/liferay/bundles/liferay-portal-trunk/osgi/portal/com.liferay.portal.search.elasticsearch.jar
[ivy:resolve] :: Apache Ivy 2.3.0 - 20130110142753 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file = /home/tibusz/git/liferay-portal/tools/sdk/ivy-settings.xml
[ivy:retrieve] :: retrieving :: com.liferay#com.liferay.portal.search.elasticsearch
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  31 artifacts copied, 0 already retrieved (39005kB/49ms)
[ivy:retrieve] :: retrieving :: com.liferay#com.liferay.portal.search.elasticsearch
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  0 artifacts copied, 0 already retrieved (0kB/9ms)

deploy:
    [mkdir] Created dir: /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/classes
     [copy] Copying 12 files to /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/classes
     [copy] Copied 14 empty directories to 11 empty directories under /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/classes
    [javac] Compiling 28 source files to /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/classes
    [javac] /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/src/com/liferay/portal/search/elasticsearch/util/ElasticsearchHelperUtil.java:75: error: cannot find symbol
    [javac]                 term, fuzzyQuery.getMaxEdits(), fuzzyQuery.getPrefixLength());
    [javac]                                 ^
    [javac]   symbol:   method getMaxEdits()
    [javac]   location: variable fuzzyQuery of type FuzzyQuery
    [javac] /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/src/com/liferay/portal/search/elasticsearch/util/ElasticsearchHelperUtil.java:117: error: incompatible types
    [javac]             BytesRef lowerTerm = termRangeQuery.getLowerTerm();
    [javac]                                                             ^
    [javac]   required: BytesRef
    [javac]   found:    String
    [javac] /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/src/com/liferay/portal/search/elasticsearch/util/ElasticsearchHelperUtil.java:118: error: incompatible types
    [javac]             BytesRef upperTerm = termRangeQuery.getUpperTerm();
    [javac]                                                             ^
    [javac]   required: BytesRef
    [javac]   found:    String
    [javac] /home/tibusz/git/liferay-portal/modules/portal/portal-search-elasticsearch/src/com/liferay/portal/search/elasticsearch/util/ElasticsearchHelperUtil.java:126: error: no suitable constructor found for TermRangeQuery(String,BytesRef,BytesRef,boolean,boolean)
    [javac]                 new TermRangeQuery(
    [javac]                 ^
    [javac]     constructor TermRangeQuery.TermRangeQuery(String,String,String,boolean,boolean,Collator) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor TermRangeQuery.TermRangeQuery(String,String,String,boolean,boolean) is not applicable
    [javac]       (actual argument BytesRef cannot be converted to String by method invocation conversion)
    [javac] 4 errors

BUILD FAILED
/home/tibusz/git/liferay-portal/tools/sdk/build-common-plugin.xml:196: The following error occurred while executing this line:
/home/tibusz/git/liferay-portal/tools/sdk/build-common.xml:2613: The following error occurred while executing this line:
: The following error occurred while executing this line:
/home/tibusz/git/liferay-portal/tools/sdk/build-common.xml:1222: The following error occurred while executing this line:
: The following error occurred while executing this line:
/home/tibusz/git/liferay-portal/tools/sdk/build-common.xml:1639: The following error occurred while executing this line:
: The following error occurred while executing this line:
/home/tibusz/git/liferay-portal/tools/sdk/build-common.xml:476: The following error occurred while executing this line:
/home/tibusz/git/liferay-portal/tools/sdk/build-common.xml:740: Compile failed; see the compiler error output for details.

Total time: 6 seconds
tibusz@tibusz-E6520:~/git/liferay-portal/modules/portal/portal-search-elasticsearch{LPS-48640-es}$
````

It looks like if ES used lucene-3.5.0 jars from the portal's lib instead of using its own lucene-4.9.0 libs that are actually configured in its .classpath file btw. :/

Thank you!