Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick Question about cz.muni.fi.mias.search.Searching - Query String; #5

Open
fras2560 opened this issue Aug 3, 2017 · 0 comments
Open

Comments

@fras2560
Copy link

fras2560 commented Aug 3, 2017

For the method:

/**
     * Searches the index for query specified by string.
     *
     * @param query String with the query
     * @param print if true, results will be printed to standard output
     * @param offset index of the first retrieved result
     * @param limit number of results to retrieve
     * @param debug if true, results will contain debugging information
     *
     * @return Search result
     */
    public SearchResult search(String query, boolean print, int offset, int limit, boolean debug) {
        return search(query, print, offset, limit, debug, MathTokenizer.MathMLType.BOTH);
}

What does the query string look like?

I am sending it something like this:

<m:math>
          <m:semantics xml:id="m1.1a">
            <m:apply xml:id="m1.1.4" xref="m1.1.4.pmml">
              <m:plus xml:id="m1.1.2" xref="m1.1.2.pmml"/>
              <m:ci xml:id="m1.1.1" xref="m1.1.1.pmml">x</m:ci>
              <mws:qvar xmlns:mws="http://search.mathweb.org/ns" name="y"/>
            </m:apply>
            <m:annotation-xml encoding="MathML-Presentation" xml:id="m1.1b">
              <m:mrow xml:id="m1.1.4.pmml" xref="m1.1.4">
                <m:mi xml:id="m1.1.1.pmml" xref="m1.1.1">x</m:mi>
                <m:mo xml:id="m1.1.2.pmml" xref="m1.1.2">+</m:mo>
                <mws:qvar xmlns:mws="http://search.mathweb.org/ns" name="y"/>
              </m:mrow>
            </m:annotation-xml>
            <m:annotation encoding="application/x-tex" xml:id="m1.1c">x+\qvar@construct{y}</m:annotation>
          </m:semantics>
        </m:math>
Mean
Arithmetic

Am I on the right track? It is giving me an error however:

Exception in thread "main" java.lang.IllegalArgumentException: expected '>' at position 59
	at org.apache.lucene.util.automaton.RegExp.parseSimpleExp(RegExp.java:1128)
	at org.apache.lucene.util.automaton.RegExp.parseCharClassExp(RegExp.java:1091)
	at org.apache.lucene.util.automaton.RegExp.parseComplExp(RegExp.java:1079)
	at org.apache.lucene.util.automaton.RegExp.parseRepeatExp(RegExp.java:1048)
	at org.apache.lucene.util.automaton.RegExp.parseConcatExp(RegExp.java:1041
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant