custom search refreshing on submit and not giving results

The custom search refreshes on submit and also does not give any results. I am not sure what is wrong with the code but if someone could take a look at it to help me see what I am missing, I would sure appreciate it. Thank you in advance.

front-page.php

<form> <section class="" style="margin-top: 60px; padding-bottom: 0;"> <div class="concept-bar">   <div class="container">   <h2 class="title-bar">EJES ESTRATÉGICOS</h2>     <div class="row" style="padding-top: 20px;">       <div class="col-4">         <div class="number-holder"><span class="eje-number">1</span>           <h2 class="concept-item">DESAROLLO INTEGRAL DE TALENTO</h2>         </div>       </div>       <div class="col-4">         <div class="number-holder"><span class="eje-number">2</span>           <h2 class="concept-item">APOYO AL BEISBOL INFANTIL Y JUVENIL</h2>         </div>        </div>       <div class="col-4">         <div class="number-holder"><span class="eje-number">3</span>           <h2 class="concept-item">IMPULSO DE CONCEPTO "BEISBOL" EN MÉXICO</h2>         </div>       </div>     </div>   </div>   </div> </section>  <section class="s-raking">     <div class="container">          <?php             $  terms = get_terms( array(                 'taxonomy' => 'ranking',                 'hide_empty' => false,             ) );         ?>  <!-- <?php         if(isset($  _GET["position"])){             $  position=$  _GET["position"];             // echo "select position is => ".$  position;         } ?>  -->          <h2 class="title-bar" data-ranking="<?php echo $  terms[0]->slug; ?>">Ranking <span><?php echo $  terms[0]->name; ?></span>             <div class="ranking-nav-btn">               <div class="customPrevBtn4"><i class="fa fa-angle-left"></i></div>               <div class="customNextBtn4"><i class="fa fa-angle-right"></i></div>             </div>         </h2>          <div class="row no-gutters">              <div class="col-lg-8">                 <div class="slider-ranking owl-carousel">                      <?php                         foreach($  terms as $  term) { ?>                      <div class="rankig-one" style='background:url(<?php the_field('bg_image', 'term_' .$  term->term_id ); ?>) no-repeat scroll center center; background-size: cover;' data-title="<?php echo $  term->slug; ?>">                         <h3><?php the_field('title_normal', 'term_' .$  term->term_id ); ?> <?php if(get_field('title_strong', 'term_' .$  term->term_id )) { ?><span><?php the_field('title_strong', 'term_' .$  term->term_id ); ?></span><?php } ?></h3>              <!-- <ul class="ajax-content2"> -->                          <?php                          $  posts = get_field('top_players', 'term_' .$  term->term_id );                         if( $  posts ): ?>                             <ul>                             <?php $  i = '1'; foreach( $  posts as $  post): ?>                                 <?php setup_postdata($  post); ?>                                 <li><a href="<?php the_permalink(); ?>"><?php echo $  i; ?> <?php the_title(); ?></a></li>                             <?php $  i++; endforeach; ?>                             </ul>                             <?php wp_reset_postdata(); ?>                         <?php endif;  ?>                      </div>                      <?php } ?> <!-- </ul> -->                 </div>             </div>              <div class="col-lg-4">                 <div class="filters-ranking">                     <div class="filters-search">                         <input type="text" class="quicksearch" placeholder="Encuentra a un jugador" />                         <i class="fa fa-search"></i>                     </div>                     <div class="tabs d-flex">                         <span class="tab">Ranking</span>                         <span class="tab">Selecciona tu estado</span>                     </div>                     <div class="tab_content">                         <div class="tab_item">                             <div class="filters-bar">                                  <select class="filters-select" name="position" onchange="this.form.submit()">                                     <?php                                         $  field_key = "field_5c80e92663dd1";                                         $  field = get_field_object($  field_key);                                         foreach ( $  field['choices'] as $  k => $  v ) {                                             echo '<option value="' . $  k . '">' . $  v . '</option>';                                         }                                     ?>                                 </select>                              </div>                             <div class="players-results" id="ajax-content"></div>                         </div>                         <div class="tab_item">               <div class="players-state">                 <ul>                     <?php                         $  field_key = "field_5cebb7e973218";                         $  field = get_field_object($  field_key);                         foreach ( $  field['choices'] as $  k => $  v ) {                             echo '<li data-value="' . $  k . '">' . $  v . '</li>';                         }                     ?>                 </ul>                               </div>                   </div>                     </div>                 </div>             </div>               <div class="players-results" class="ajax-content2"></div>         </div>       </div> </section>   </form> 

scripts.js

/*ranking filter select*/   $  (".filters-select").on("change", function() {     ranking();   });    /*ranking filter search*/   var ts = $  (".quicksearch").val();   $  (".quicksearch").attr("data-search", ts);   $  (".quicksearch").keyup(function(e) {     var ts = $  (this).val();     $  (".quicksearch").attr("data-search", ts);     ranking();   });    $  (".filters-ranking .players-state").mCustomScrollbar({     scrollButtons: { enable: true }   });   $  (".players-state li").click(function() {     var val = $  (this).attr("data-value");     $  (".players-state").attr("data-state", val);     ranking();   });    /*for first load*/   function ranking() {     $  (".filters-ranking .players-results").mCustomScrollbar("destroy");     var position = $  (".filters-select option:selected").val();     var ranking = $  (".s-raking .title-bar").attr("data-ranking");     var search = $  (".quicksearch").attr("data-search");     var state = $  (".players-state").attr("data-state");      $  .ajax({       url: ajaxurl,       type: "post",       data: {         action: "players",         position: position,         ranking: ranking,         search: search,         state: state       },       success: function(response) {         $  ("#ajax-content").html(response);         $  (".filters-ranking .players-results").mCustomScrollbar({           scrollButtons: { enable: true }         });       }     });      $  .ajax({       url: ajaxurl,       type: "post",       data: {         action: "playersmain",         position: position,         ranking: ranking,         search: search,         state: state       },       success: function(response) {         $  (".ajax-content2").html(response);       }     });   }   ranking();    /*ranking filter select MLB*/   $  (".filters-select-MLB").on("change", function() {     ranking2();   });   function ranking2() {     $  (".ranking-wrap .players-results").mCustomScrollbar("destroy");     var position = $  (".filters-select-MLB option:selected").val();      $  .ajax({       url: ajaxurl,       type: "post",       data: {         action: "playersMLB",         position: position       },       success: function(response) {         $  ("#ajax-content-MLB").html(response);         $  (".ranking-wrap .players-results").mCustomScrollbar({           scrollButtons: { enable: true }         });       }     });   }   ranking2(); 

functions.php

add_action( 'wp_ajax_nopriv_players', 'players' ); add_action( 'wp_ajax_players', 'players' ); function players() {      $  position = $  _POST['position'];     $  ranking = $  _POST['ranking'];     $  search = $  _POST['search'];     $  state = $  _POST['state'];      $  args = array(         'post_type'  => 'players_lpm',         'posts_per_page' => -1,         's' => $  search,         'tax_query' => array(             array(                 'taxonomy' => 'ranking',                 'field'    => 'slug',                 'terms'    => $  ranking             )         ),         'meta_query' => array(         array( 'key' => 'position', 'value' => $  position, 'compare' => 'LIKE' ),         array( 'key' => 'state', 'value' => $  state, 'compare' => 'LIKE' ),         'relation' => 'AND'         )     );      $  the_query = new WP_Query( $  args ); $  i2 = '1';     echo '<ul>';     while ($  the_query -> have_posts()) : $  the_query -> the_post();     echo '<li><a href="'.get_permalink().'"><span>'.$  i2.'</span>'.get_the_title().'</a></li>';     $  i2++; endwhile; wp_reset_postdata();     echo '</ul>';     die(); }  add_action( 'wp_ajax_nopriv_playersmain', 'playersmain' ); add_action( 'wp_ajax_playersmain', 'playersmain' ); function playersmain() {      $  position = $  _POST['position'];     $  ranking = $  _POST['ranking'];     $  search = $  _POST['search'];     $  state = $  _POST['state'];      $  args = array(         'post_type'  => 'players_lpm',         'posts_per_page' => -1,         's' => $  search,         'tax_query' => array(             array(                 'taxonomy' => 'ranking',                 'field'    => 'slug',                 'terms'    => $  ranking             )         ),         'meta_query' => array(             array( 'key' => 'position', 'value' => $  position, 'compare' => 'LIKE' ),             array( 'key' => 'state', 'value' => $  state, 'compare' => 'LIKE' ),             'relation' => 'AND'         )     );      $  the_query = new WP_Query( $  args ); $  i2 = '1';     while ($  the_query -> have_posts()) : $  the_query -> the_post();     echo '<li><a href="'.get_permalink().'"><span>'.$  i2.'</span>'.get_the_title().'</a></li>';     $  i2++; endwhile; wp_reset_postdata();     die(); } 

The site is https://probeis.mx and the search box can be seen in the following image: enter image description here

Principal variation search: how to keep track of the best move

I have a Java implementation of the Principal Variation Search algorithm, and it looks like that:

public final class PrincipalVariationSearchGameEngine          <S extends AbstractState<S, P>,          P extends Enum<P>>             extends AbstractGameEngine<S, P> {      public PrincipalVariationSearchGameEngine(             EvaluatorFunction<S> evaluatorFunction,             int depth) {         super(evaluatorFunction, depth, Integer.MAX_VALUE);     }      @Override     public S makePly(S state,                       P minimizingPlayer,                       P maximizingPlayer,                       P initialPlayer) {         state.setDepth(depth);          return makePlyImplTopmost(state,                                   depth,                                   Double.NEGATIVE_INFINITY,                                   Double.POSITIVE_INFINITY,                                   initialPlayer == minimizingPlayer ? -1 : 1);     }      /**      * Performs the search directly under the root node denoted by       * {@code state].      *       * @param state the root state of the game tree to search.      * @param depth the total depth of the search.      * @param alpha the alpha cutoff value.      * @param beta  the beta cutoff value.      * @param color the color. -1 for minimizing player, +1 for maximizing      *              player.      * @return the game board after optimal move from {@code state}.      */     private S makePlyImplTopmost(S state,                                  int depth,                                  double alpha,                                  double beta,                                  int color) {         boolean firstChild = true;         S bestState = null;         double tentativeScore = color == -1 ?                                 Double.POSITIVE_INFINITY :                                 Double.NEGATIVE_INFINITY;          for (S child : state.children()) {             double score;              if (firstChild) {                 firstChild = false;                 score = -makePlyImpl(child,                                       depth - 1,                                       -beta,                                       -alpha,                                      -color);                 bestState = child;                 tentativeScore = score;             } else {                 score = -makePlyImpl(child,                                       depth - 1,                                       -alpha - 1.0,                                       -alpha,                                      -color);                  if (color == -1) {                     if (tentativeScore > score) {                         tentativeScore = score;                         bestState = child;                     }                 } else {                     if (tentativeScore < score) {                         tentativeScore = score;                         bestState = child;                     }                 }                  if (alpha < score && score < beta) {                     score = -makePlyImpl(child,                                           depth - 1,                                          -beta,                                          -score,                                          -color);                      if (color == -1) {                         if (tentativeScore > score) {                             tentativeScore = score;                             bestState = child;                         }                     } else {                         if (tentativeScore < score) {                             tentativeScore = score;                             bestState = child;                         }                     }                 }             }              if (alpha < score) {                 alpha = score;             }              if (alpha >= beta) {                 break;             }         }          return bestState;     }      private double makePlyImpl(S state,                                int depth,                                double alpha,                                double beta,                                int color) {         if (state.getDepth() == 0                  || state.checkVictory() != null                 || state.isTerminal()) {             return color * evaluatorFunction.evaluate(state);         }          boolean firstChild = true;          for (S child : state.children()) {             double score;              if (firstChild) {                 firstChild = false;                 score = -makePlyImpl(child,                                       depth - 1,                                       -beta,                                       -alpha,                                      -color);             } else {                 score = -makePlyImpl(child,                                       depth - 1,                                       -alpha - 1.0,                                       -alpha,                                      -color);                  if (alpha < score && score < beta) {                     score = -makePlyImpl(child,                                           depth - 1,                                          -beta,                                          -score,                                          -color);                 }             }              alpha = Math.max(alpha, score);              if (alpha >= beta) {                 break;             }         }          return alpha;     } } 

This, however, does not work since it returns suboptimal (next) moves. I believe that the culprit is this if statement:

if (color == -1) {     if (tentativeScore > score) {         tentativeScore = score;         bestState = child;     } } else {     if (tentativeScore < score) {         tentativeScore = score;         bestState = child;     } } 

up to 60,000 Organic Website Visits from Google Search (over 1 month) (CUSTOMIZEABLE!) for $39

Ultra customizeable! (Great for Google Analytics!) 60,000 page views in 1 month20,000 unique visitors!up to 10 search keywordsGEO targeted! (countries or continents)Customize time on site! (30 seconds to 5 minutes) [NOTE: more than 1 minute can reduce total visitors on site to less than 60,000]Customize bounce rate! (15%-60%)Customize returning visitors! (30%-90%)Up to 3 extra URL click actions! (can be distributed across up to 5 URLs each action, for 15 total URLs!)Choose Mobile Only, Desktop Only, 30% mobile, or Random.GUARANTEED or FULL REFUND!

by: multimrweb
Created: —
Category: Traffic
Viewed: 255


Read Custom search property using Display Template in sharepoint online

Is it possible to read the value of custom crawled property that is mapped to the refinablestring00 property in a search result web part using Display Templates in SharePoint Online (Office 365)?

How to Create Display Templates that Display custom crawled property in SharePoint Online (Office 365)?

Google Adds Breadcrumb Structured Data To Search Console Enhancement Report

I got a errors notice in my email this am for one of the sites I look after regarding this:

Quote:

Google added another report this week to Google Search Console’s enhancement report section. The new report shows you about structured data errors, warnings and success specifically with breadcrumb structured data….


Google Adds Breadcrumb Structured Data To Search Console Enhancement Report
Sep 20, 2019

But when I looked the problem is against good web design practices.

There is an old good web design practice to not include a live link in your navigation for the current page the person is on.

e.g.
Home > Category Name > Sub Category Name > Product Name

The first 3 parts of this breadcrumb trail would be clickable so the person can see where they are in the site structure and go back if necessary without using the back button. The last part (Product Name) is not clickable for usability and good practices reasons but Google wants it clickable.

So who wins? Google or good usability/practices?

Google Search Console: ID mising for breadcrumbs?

I have gotten a large numner of errors in the console this morning telling me that none of my breadcrumbs contain an ID. This is true, but it has never been required before. If I add an ID property and try to validate using the structured data validator it says that ID is not a supported field.

I checked the Google documentation for breadcrumbs and if you check the markup examples they have given, none of them contain an ID either. The Schema.org spec doesnt show ID, Google’s docs dont show ID support and Google’s own structured data testing tool says ID is both unsupported and supported. What is the issue here? Does anyone have an example of how Google want us to implement this?

Update to The Search Quality Raters Guidelines Sept 5 19

Barry Schwartz has a link to the latest Google Search Quality Raters Guidelines in this post if you would like to get a copy:

Quote:

Google has updated the Google search quality raters guidelines handbook on September 5, 2019. That is 16-weeks after it last updated the guidelines, which was on May 16, 2019 and before that, it was about 10-months since Google updated that document. The live guidelines document is located over here as a 167 page PDF right now, which is one page larger than last time, which was 166 pages….


Google Updates The Search Quality Raters Guidelines On September 5th
Sep 9, 2019

Creating a priority search tree to find the number of points in the range [-inf, qx] X [qy, qy’] from a set of points sorted on y-coordinates

A priority search tree can be constructed on a set of points P in O(n log(n)) time but if the points are sorted on the y co-ordinates then it takes O(n) time. I find algorithms for constructing the tree when the points are not sorted.

I figured out a way to do this as follows:

  1. Construct a BST on the points. Since the points are sorted then it will take O(n) time

  2. Min-Heapify the BST on the x-coordinates This will take theta(n) time

So total time complexity will be O(n)

Is this a valid approach to construct a Priority Search Tree in O(n) time??

Do Advance Data Entry And Web search in your time for $10

Hello Sir, I’m very proficient and have valuable experience in Data Entry. I can very fast work and timely delivery. My Services List: 1.Web Research and data collecting 2. Online or Offline Data Entry 3.Data Mining 4.Copy-paste 5.Lead generation 6.Data Conversion 7.LinkedIn data collection 8.Company Name, address, mail, contact number 9.Companies Data Research for Business Development Purposes 10.Data collecting from the web Please contact me before ordering to confirm the requirements. i am active 16 hour in a day Can you Order with Confidence Thanks

by: Mdredoy
Created: —
Category: Data Entry
Viewed: 262


How to display properties for search results

We have a site collection with several subsites that are based upon our organization’s department structure. We have a custom search page and want to include the SiteTitle managed property on every search result. Very (similar to this tutorial)[https://www.metrostarsystems.com/enterprise-it/part-3-bonus-sharepoint-demo/] except we want to add it to every result type — well webpages, sites, list items, discussions, and all the document-y types.

That tutorial shows how to go to Masterpage gallery > Display templates > Search and create a duplicate of the Item_WebPage.html template. The copied template includes some new properties and new markup/styling for their custom result items. They then create a new Result Type to use that template for that specific type of result.

We want everything we’ve already got set up and just want to add the metadata to the bottom of the results. So instead of making custom types for access, excel, onenote, powerpoint, visio, word, discussion, reply, image, pdf, text, zip, site, wiki, list item, ad webpage. I thought that I could maybe change the Item_CommonItem_Body.html that is used by every template to render the final result.

I added the SiteTitle managed property to the <mso:ManagedPropertyMapping msdt:dt="string"> at the top of the markup. And I added the code and markup to display that property if it is available for the result item. But it doesn’t work. The property is not available in the results.

I then added the property to one of the specific item templates Item_Site.html. But that didn’t work either until I added a custom result type that told SP to use the Item_Site.html for SharePoint Sites. There is already a result type that uses this same template for the same result type specified by our central search service (which I can’t touch). So this works for all results (because they all eventually use Item_CommonBody), but only if the results include at least one site. If the results don’t include a site then none of them show the metadata.

I’ve also seen reference to updating the managed properties from the result types page, but I’ve never seen that even when I make changes to the managed properties mapping.

So is there a way that I can add a custom property (or properties) to all search result types without having to add it to each Item Template and the create the exact same result types that already exist to use the templates we are already using?