Giter Club home page Giter Club logo

Comments (3)

Shazwazza avatar Shazwazza commented on September 4, 2024

It's splitting because it's probably using the StandardAnalyzer on that field. If you want to search on UDI and you are storing UDI in a specific field, then you'd have to set that field type to be 'raw'

Else just search on the GUID part which is already indexed in the Key (or __Key - sorry can't recall off the top of my head) field with the correct field type set already

from examine.

nickornotto avatar nickornotto commented on September 4, 2024

I am using the InternalIndex for this purpose atm and it is using WhitespaceAnalyzer.

ExternalIndex throws the same error tbh despite it uses StandardAnalyzer.

It works with the key however it is not understandable how the same query that worked in Umbraco 7 cannot work in Umbraco 8-10?

Umbraco 10 does this when I pass Udi as the categoryId value:
LuceneQuery: {__NodeTypeAlias:product +(categoryId:umb categoryId:document categoryId:671cf7620759444fa54ccaa2f23b8d2a)}

so I need to use a key instead of Udi:

LuceneQuery: {+(+__IndexType:content +__NodeTypeAlias:product) +categoryId:671cf7620759444fa54ccaa2f23b8d2a}

If I use a raw query I am getting an error because of the colon in the value:

Cannot parse '+__IndexType:content +(__NodeTypeAlias:product +supplier:umb://document/671cf7620759444fa54ccaa2f23b8d2a -umbracoNaviHide:1) ': Encountered " ":" ": "" at line 1, column 61.

While Umbraco 7 was fine with this:

LuceneQuery: {__NodeTypeAlias:product +categoryId:umb://document/2ec733b1cbab4632b5ccf753b94b8105}

and it didn't see it as an error.

Or am I not building the raw query correctly?

from examine.

Shazwazza avatar Shazwazza commented on September 4, 2024

I am using the InternalIndex for this purpose atm and it is using WhitespaceAnalyzer. ExternalIndex throws the same error tbh despite it uses StandardAnalyzer.

Yes, both analyzers will tokenize terms based on punctuation, whitespace, etc... Standard will do more though.

__Key and anything prefixed with double underscore have a specific field analyzer set to KeywordAnalyzer (exact match).

You are searching on a custom field of categoryId so categoryId needs to be configured as a Raw Value Type - this is not the same as a raw query. A Value Type determines what Analyzer will be used for that field and how it is stored. There's documentation on this here and how to configure them and the available types that there are https://shazwazza.github.io/Examine/configuration

A raw query determines how the search terms is going to be tokenized before the search.

from examine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.