Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Namespace Lucene.Net.Expressions.JS

    Javascript expressions

    A Javascript expression is a numeric expression specified using an expression syntax that's based on JavaScript expressions. You can construct expressions using:

    • Integer, floating point, hex and octal literals

    • Arithmetic operators: + - * / %

    • Bitwise operators: | & ^ ~ << >> >>>

    • Boolean operators (including the ternary operator): && || ! ?:

    • Comparison operators: &lt; <= == >= >

    • Common mathematic functions: abs ceil exp floor ln log2 log10 logn max min sqrt pow

    • Trigonometric library functions: acosh acos asinh asin atanh atan atan2 cosh cos sinh sin tanh tan

    • Distance functions: haversin

    • Miscellaneous functions: min, max

    • Arbitrary external variables - see Bindings

    JavaScript order of precedence rules apply for operators. Shortcut evaluation is used for logical operators—the second argument is only evaluated if the value of the expression cannot be determined after evaluating the first argument. For example, in the expression a || b, b is only evaluated if a is not true.

    To compile an expression, use JavascriptCompiler.

    Classes

    JavascriptCompiler

    An expression compiler for javascript expressions.

    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.