Giter Site home page Giter Site logo

soen / conjunction Goto Github PK

View Code? Open in Web Editor NEW
12.0 9.0 1.0 2.3 MB

A Sitecore utility designed to create configurable and personalizable queries for either the Lucene or Solr search engine using Sitecore's ContentSearch API

Home Page: https://soen.github.io/Conjunction

License: MIT License

C# 99.40% Batchfile 0.08% PowerShell 0.53%
sitecore conjunction sitecore-contentsearch-api

conjunction's Introduction

Conjunction is a utility for Sitecore that solves the issue of creating configurable and personalizable queries for either the Lucene or Solr search engine, using Sitecore's ContentSearch API as the backbone.

Build status

Features

Conjunction has some interesting parts that are worth mentioning, as it:

  • Enables search query configuration without code changes
  • Allows specifying nested search query structures for complex queries
  • Allows a search query to either react to values provided dynamically, or by using preset default values
  • Makes it possible to vary search queries based on personalization
  • Uses the ContentSearch API as the underlying interface for querying search results
  • Enables extensibility

Installation instructions

Before installing Conjunction, you'll need a working Sitecore 8.0 (or later) instance running on your machine.

  • Install Conjunction binaries. This is as simple as adding the Conjunction.Foundation.Core NuGet package to your project.
  • Install Conjunction Sitecore package. You can find the required Sitecore package here, which contains the nessecary Sitecore templates and items required to configure search queries from Sitecore.

Documentation

License

This project is licensed under the MIT License.

conjunction's People

Contributors

saturate avatar soen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

alphaklp

conjunction's Issues

Move Sitecore specific code out of the Conjunction.Foundation.Core assembly

Do you want to request a feature or report a bug?
Feature/Change.

What is the current behavior?
Currently, the core assembly of Conjunction Conjunction.Foundation.Core contains both abstract interfaces and generic implementation details, as well as Sitecore specific implementation details.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
N/A

What is the expected behavior?
The core assembly should be split into two separate assemblies, whereas the existing Conjunction.Foundation.Core assembly only contains abstract interfaces and generic implementation details. Likewise, a new assembly (could be named Conjunction.Foundation.Sitecore) should exist, which should contain all the concrete implementation details in the context of using Sitecore - this assembly will be dependant on the Conjunction.Foundation.Core assembly.

What is the motivation / use case for changing the behavior?
In its current state, the Conjunction.Foundation.Core assembly is tightly coupled together with Sitecore specific implementation details. This makes it hard to reuse the true "core" parts of the Conjunction.Foundation.Core assembly in a different context.

Which versions of Conjunction is affected by this issue? Did this work in previous versions of Conjunction?
Current production and development version is affected.

Other information (e.g. stacktraces, related issues, suggestions how to fix)
N/A

Write documentation

Currently the only documentation available is the Demo project, that shows the vary basic of the Core API in code. However, there is no information about how you would setup the search query element configuration from within Sitecore, etc.

The documentation should contain:

  • A mental model for how the search query element structure is organized (and related)
  • A detailed description on how to setup search query roots, groupings and rules
  • A description on how to use the API from code (an example is already included in the Demo project)
  • How you can extend the different API parts (i.e. the different providers, making you own IndexableEntity, etc.)

In order to create a modern and simple solution to documentation, we'll be using GitBook as the foundation.

Setup continuous integration

Setup continuous integration that builds and tests the solution, possibly also building NuGet packages ready to be deployed.

Add support for having multiple value providers

Do you want to request a feature or report a bug?

Feature.

What is the current behavior?

It is only possible to have a single value provider for all parts of the search query.

What is the expected behavior?

Search query rule elements should be able to specify their value provider through configuration.

What is the motivation / use case for changing the behavior?

Looking the the value providers, Conjunction ships with a built-in one, that allows grabbing dynamic provided values from, say, the query string. However, it was originally designed such that the value provider could be anything really - a web service, the data exchange framework, or such. But one thing that I didn’t plan for, was the need for having more than more source of value provider, and this is something that would be great to extend as well. Imagine that we had some parts of the query that allowed retrieving their values from the query string, then some other parts would grab their values from the data exchange framework, or something else. That way we can truly leverage the power of combining multiple data sources together with searching.

Which versions of Conjunction is affected by this issue? Did this work in previous versions of Conjunction?

Initial version, v1.0.

Other information (e.g. stacktraces, related issues, suggestions how to fix)

N/A

Conjunction template location is a bit off

The location of the module is a bit off compared to what other people use.

I would expect a module to install Items under
/sitecore/templates/Modules/[ModuleName]

/sitecore/templates/Modules/[ModuleName]

To have a common behaviour with the rest of the community projects out there.

It is a "problem" in Conjunction 1.0

Refactor Unicorn serialized content to follow Sitecore Helix structure

Do you want to request a feature or report a bug?

Bug/Change

What is the current behavior?

The current Unicorn serialized content doesn't follow the practices described in Helix. Currently, the serialized content lives under a single project named Conjunction.Foundation.Content, which should be separated out into the respective projects. This means that content (settings, templates, etc) related to the Core part of the project, goes into a 'serialization' folder under the Core project.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

N/A

What is the expected behavior?

The serialized items should live under their respective domains, rather then being placed into a single Content project.

What is the motivation / use case for changing the behavior?

The project should adhere to the principles and practices of Helix.

Which versions of Conjunction is affected by this issue? Did this work in previous versions of Conjunction?

Development, has not yet been released.

Other information (e.g. stacktraces, related issues, suggestions how to fix)

The answer provided here should be used as a basis for the restructuring.

Rework the way that indexable entity types are configured and how properties from this is selected on search query rules

Currently, you have to define the indexable entity type by fully qualified namespace on the search query root item. In addition, for each search query rule, you have to specify the property name of the given indexable entity type that you want to perform the rule on. Although this works, this approach is prone to error, since both inputs are defined using a textbox without any kind of validation - the UI should handle this a bit more elegantly.

A solution to this could be to have a dropdown for selecting indexable types enumerate all assemblies in the Sitecore solution, and list all types that inherit from the IndexableEntity type. Then for search query rules, we could also use a dropdown, whereas the source of the property names must come from the configured indexable entity type set on the search query root item.

In terms of getting the correct elements displayed in the dropdown menus, one way would be to override the Sitecore.Pipelines.GetLookupSourceItems pipeline, and implement a specific pipeline for retrieving the types of indexable entity types as well as getting the fields of the selected indexable entity type using reflection. This blog post provides a good starting point for doing this: http://blog.rauljimenez.co.uk/getting-to-the-source/. The other alternative would be to create custom field types for each of the two, but that seems a bit over the top to do.

Add more robust error handling and logging

Currently most of the methods asserts that parameters cannot be null (or empty), but there are still a few places left where this is missing.

Also, there is also not enough error/info/warn logging.

Add Azure Search support

Recently, Sitecore added support for Azure Search to the ContentSearch API.

Going through the documentation listed here, it seems that the current codebase should support Azure Search. However, the API needs to be tested fully using Azure Search in order to ensure that nothing breaks.

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.