This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/common/class.wpes-analyzer-builder.php b/src/common/class.wpes-analyzer-builder.php | |
index 0357ea4..5787479 100644 | |
--- a/src/common/class.wpes-analyzer-builder.php | |
+++ b/src/common/class.wpes-analyzer-builder.php | |
@@ -340,6 +340,29 @@ class WPES_Analyzer_Builder { | |
continue; | |
} | |
+ if ( 'de' == $lang ) { | |
+ ////From: http://gibrown.wordpress.com/2013/05/01/three-principles-for-multilingal-indexing-in-elasticsearch/#comment-857 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//These are some params I've used elsewhere, may want to try adjusting | |
$date_scale = '5d'; | |
$date_decay = 0.99999; | |
$date_origin = date( 'Y-m-d' ); | |
$query = array( | |
'query' => array( | |
"function_score" => array( | |
'query' => array( 'filtered' => array( | |
'query' => array( 'multi_match' => array( | |
'query' => $query, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Theme_Support_Index_Builder extends WPES_Abstract_Index_Builder { | |
public function get_config( $args ) { | |
$defaults = array( | |
'lang' => 'en', | |
); | |
$args = wp_parse_args( $args, $defaults ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This uses the wpes-lib framework to build the index: https://github.com/automattic/wpes-lib | |
class WPOrg_Plugins_Index_Builder extends VIP_Index_Builder { | |
//override to add support for all analyzers | |
public function get_settings( $args ) { | |
$defaults = array( | |
); | |
$args = wp_parse_args( $args, $defaults ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To prep a file for this script: | |
# - take a list of docs orig.json with one json doc per line | |
# - run: split -l 1000 orig.json orig-split | |
export ESINDEX="$1" #ES index name | |
export ESTYPE="$2" #ES document type name | |
JSONFILE="$3" #JSON file path name. One doc per line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as mdates | |
from pylab import * | |
import math | |
from scipy.stats import beta, norm, uniform | |
from scipy.special import betaln | |
from random import random, normalvariate | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/python | |
import sys | |
import org_search as org | |
import pprint | |
import csv | |
#Configuration | |
lang='en_US' | |
min_count=1000 |
OlderNewer